<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[CodeOps - Medium]]></title>
        <description><![CDATA[The junction is a technology intersection  devoted to articles and posts related to DevoOps and Software Development - Medium]]></description>
        <link>https://medium.com/codeops?source=rss----9edb68504a10---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>CodeOps - Medium</title>
            <link>https://medium.com/codeops?source=rss----9edb68504a10---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:41:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/codeops" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Spring Boot Cloud Centralised Config Server]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codeops/spring-boot-cloud-centralised-config-server-bd47a85f9571?source=rss----9edb68504a10---4"><img src="https://cdn-images-1.medium.com/max/2499/0*p0PgGLLpm0rCi1rP.png" width="2499"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/codeops/spring-boot-cloud-centralised-config-server-bd47a85f9571?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/spring-boot-cloud-centralised-config-server-bd47a85f9571?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/bd47a85f9571</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <category><![CDATA[config]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 10:50:15 GMT</pubDate>
            <atom:updated>2023-01-10T10:50:15.827Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Kubernetes Readiness and Liveness Probe in Spring Boot Application]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codeops/kubernetes-readiness-and-liveness-probe-in-spring-boot-application-6214274b0dfd?source=rss----9edb68504a10---4"><img src="https://cdn-images-1.medium.com/max/1000/0*6QYFNm0RQ8Blo-Xr.png" width="1000"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/codeops/kubernetes-readiness-and-liveness-probe-in-spring-boot-application-6214274b0dfd?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/kubernetes-readiness-and-liveness-probe-in-spring-boot-application-6214274b0dfd?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/6214274b0dfd</guid>
            <category><![CDATA[readinessprobe]]></category>
            <category><![CDATA[livenessprobe]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Tue, 18 Oct 2022 17:34:21 GMT</pubDate>
            <atom:updated>2022-10-18T17:34:21.458Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Leveraging on Zenko CloudServer for hosting a local S3 Server]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In this post, I&#x2019;m going to show you how to host your own s3 server locally on your machine or perhaps for development/test purposes.</p><p class="medium-feed-link"><a href="https://medium.com/codeops/leveraging-on-zenko-cloudserver-for-hosting-a-local-s3-server-6a02ee076af?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/leveraging-on-zenko-cloudserver-for-hosting-a-local-s3-server-6a02ee076af?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a02ee076af</guid>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Sun, 06 Mar 2022 20:55:19 GMT</pubDate>
            <atom:updated>2022-03-06T20:55:19.204Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Setup Auto Deployment to GKE with Bitbucket Pipelines]]></title>
            <link>https://medium.com/codeops/how-to-setup-auto-deployment-to-gke-with-bitbucket-pipelines-547d19bf8ccc?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/547d19bf8ccc</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bitbucket-pipelines]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 10:53:36 GMT</pubDate>
            <atom:updated>2019-07-24T10:53:36.293Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide will help you configure Bitbucket Pipelines to automatically deploy updates to a containerized application in GKE.We will basically setup a simple node app, deploy it on GKE and push update commits.</p><blockquote>This guide assumes you have prior understanding of Kubernetes and your GKE cluster already setup.</blockquote><h4>Creating The Initial Deployment</h4><p>For the Pipeline to be able to update GKE deployment, the deployment must exist.So will go ahead and create the initial deployment.Run below command.</p><pre>kubectl create -f k8s-create-deployment-cm.yaml</pre><p>See content of <em>k8s-create-deployment-cm.yaml </em>below</p><pre>apiVersion: extensions/v1beta1<br>kind: Deployment<br>metadata:<br>  name: node-express-app<br>  labels:<br>    app: node-express-app<br>    role: backend<br>    stage: test<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: node-express-app<br>      version: v0.0.1<br>  template:<br>    metadata:<br>      labels:<br>        app: node-express-app<br>        version: v0.0.1<br>    spec:<br>      containers:<br>        - name: node-app<br>          image: eu.gcr.io/quickfoodies/node-app:8bb8d5c456426b20ca49515331fe0efab9ba10f0<br>          imagePullPolicy: Always<br>          ports:<br>            - containerPort: 3000</pre><h4>Create GCP Service Account and Secret Key</h4><p>To push docker images to GCR we need to be authorized and authenticated to access the api.Follow below to do this.</p><ul><li>Click on <strong><em>IAM &amp; Admin </em></strong>on the navigation bar.</li><li>On the IAM &amp; Admin Console click on <strong><em>Service Accounts.</em></strong></li><li>Click on <strong><em>CREATE SERVICE ACCOUNT</em></strong></li><li>Enter account details see below and click <strong><em>CREATE</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0uvTFxZLildeOWllPooNg.png" /></figure><ul><li>Select <strong><em>Storage Admin</em></strong> as role.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnTgA0B7ZiQZlQbJa9_1Qg.png" /></figure><ul><li>Next click on <strong>Create Key </strong>as below</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SU9uzDl2I75efCw2zKSVQ.png" /></figure><ul><li>This will automatically down a json secret key onto your machine.(keep this file secured)</li></ul><h4><strong>Bitbucket Pipeline Variables</strong></h4><p>We will also need to create the following variables in Bitbucket as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qny6JsGtwHzjP0UKnNxeVw.png" /></figure><blockquote>Note <strong>GCLOUD_API_KEYFILE</strong> is the content of your json secret key which was downloaded in previous step.</blockquote><h4>The Bitbucket Pipeline File</h4><pre>image: node:10.15.0</pre><pre>pipelines:<br>  default:<br>    - step:<br>        name: Run NPM Install<br>        caches:<br>          - node<br>        script: <br>          - npm install<br>    - step:<br>        name: Run Node Tests<br>        caches:<br>          - node<br>        script:<br>          - npm test<br>          <br>    - step:<br>        name: Build and Push Docker Image<br>        image: google/cloud-sdk:latest<br>        script:<br>        - echo $GCLOUD_API_KEYFILE &gt; ~/.gcloud-api-key.json<br>        - gcloud auth activate-service-account --key-file ~/.gcloud-api-key.json<br>        - docker login -u _json_key --password-stdin <a href="https://$docker_gcr_repo_url/">https://$DOCKER_GCR_REPO_URL</a> &lt; ~/.gcloud-api-key.json</pre><pre>        - docker build -t $DOCKER_IMAGE_NAME:${BITBUCKET_COMMIT} .</pre><pre>        - docker tag $DOCKER_IMAGE_NAME:${BITBUCKET_COMMIT} $DOCKER_GCR_REPO_URL/$GCLOUD_PROJECT_ID/$DOCKER_IMAGE_NAME:${BITBUCKET_COMMIT}</pre><pre>        - docker push $DOCKER_GCR_REPO_URL/$GCLOUD_PROJECT_ID/$DOCKER_IMAGE_NAME:${BITBUCKET_COMMIT}</pre><pre>        - gcloud container clusters get-credentials $K8s_CLUSTER_NAME --zone=$GCLOUD_ZONE --project $GCLOUD_PROJECT_ID</pre><pre># DEPLOYMENT<br>        - kubectl set image deployment $K8s_DEPLOYMENT_NAME $K8s_DEPLOYMENT_NAME=$DOCKER_GCR_REPO_URL/$GCLOUD_PROJECT_ID/$DOCKER_IMAGE_NAME:${BITBUCKET_COMMIT} --record --namespace=$K8s_NAMESPACE</pre><p>And that’s it.The source for this tutorial is hosted on <a href="https://github.com/samaddico/node-example-ci-app..git">github</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=547d19bf8ccc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codeops/how-to-setup-auto-deployment-to-gke-with-bitbucket-pipelines-547d19bf8ccc">How to Setup Auto Deployment to GKE with Bitbucket Pipelines</a> was originally published in <a href="https://medium.com/codeops">CodeOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Coverage with Gradle and Jacoco]]></title>
            <link>https://medium.com/codeops/code-coverage-with-gradle-and-jacoco-8b2e7d580d2a?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/8b2e7d580d2a</guid>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[jacoco]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[gradle]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Fri, 24 May 2019 09:37:50 GMT</pubDate>
            <atom:updated>2019-05-24T09:37:37.213Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>So recently, I have was tasked to set up a <a href="https://continuousdelivery.com/">Continuous Delivery</a> pipeline for a number of applications at my place of work. The pipeline consisted of a number of steps including Checkout, Test, Code Coverage, Maven/Gradle Build, Push to Artifactory, Deploy to Stage Env and send a slack notification to the team. That&#39;s is pretty long, right? lol. I will probably blog on this later, but for today I will be sharing how I did the code coverage bit with <a href="https://www.eclemma.org/jacoco/">Jacoco plugin</a>. There are other tools like <a href="http://cobertura.github.io/cobertura/">Cobertura</a> and <a href="https://www.sonarqube.org/">Sonarqube</a> that serve the same purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*44BWJOl1YTOBfHVh-u4aZQ.jpeg" /></figure><h4>What is Code Coverage?</h4><p>Code coverage is a measure of how much for your application’s code has been executed in testing. This covers not only seeing which lines of code have been executed but also checking that all branches have been covered. Code coverage is also called Test coverage. This gives developer teams reassurance that their programs have been broadly tested for bugs and should be relatively error-free.</p><h4>What I did</h4><p>Now let&#39;s zoom into action. So starting from Gradle 1.6, Jacoco plugin is supported, you just have to enable it. To enable it, add below in your <strong><em>build.gradle</em></strong> file.</p><pre>apply plugin: &#39;jacoco&#39;</pre><p>Below is how the HTML output looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*0vzAYZVc5iM073tV" /></figure><p>Now let come to them, even more, sweeter part of the cake:- enforcing code coverage metrics. What this means is that a threshold or rule is set for which a <strong><em>gradle</em></strong> task can be used to verify if code coverage metrics are met based on configured rules/threshold. The build fails if any of the configured rules are not met. JaCoCo only reports the first violated rule. See the example below.</p><pre>jacocoTestCoverageVerification {<br>     violationRules { <br>             rule { <br>                  limit { <br>                        minimum = 0.7 <br>                  } <br>             } <br>     } <br>}</pre><p>When the <strong><em>jacocoTestCoverageVerification</em></strong> task is run, this rule will ensure that a code coverage metric of <strong>70% </strong>met to be able to pass the build. To run coverage verification during the build (and fail when appropriate), you will need to add below again the <strong><em>build.gradle</em></strong> file</p><pre>check.dependsOn jacocoTestCoverageVerification</pre><p>Below is an example screenshot of a failed build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*udG8-flyf6E-eoNd" /></figure><p>This brings the curtains down on this session, I hope this helps someone out there. Feel free to leave a comment or correction. The source code for this session is hosted on my <a href="https://github.com/samaddico/spring-boot-samples/tree/master/spring-boot-gradle-jacoco">GitHub</a> repository. Bye 🙂</p><p>References</p><p><a href="https://docs.gradle.org/current/userguide/jacoco_plugin.html">Gradle Jacoco plugin</a></p><p><em>Originally published by samaddico at </em><a href="https://hashcod.wordpress.com/2018/09/17/java-code-coverage-with-gradle-and-jacoco/"><em>http://hashcod.wordpress.com</em></a><em> on September 17, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b2e7d580d2a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codeops/code-coverage-with-gradle-and-jacoco-8b2e7d580d2a">Code Coverage with Gradle and Jacoco</a> was originally published in <a href="https://medium.com/codeops">CodeOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Coverage with Jacoco, Sonarqube, and Maven]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codeops/code-coverage-with-jacoco-sonarqube-and-maven-59fb04a9a383?source=rss----9edb68504a10---4"><img src="https://cdn-images-1.medium.com/max/934/1*2Dqx4Z_lJhaR0IrKDAmWjQ.png" width="934"></a></p><p class="medium-feed-snippet">In my earlier post on What is BDD and Why, I explained what BDD is and why its necessary to adopt this development style. I also touched&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codeops/code-coverage-with-jacoco-sonarqube-and-maven-59fb04a9a383?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/code-coverage-with-jacoco-sonarqube-and-maven-59fb04a9a383?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/59fb04a9a383</guid>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[qa]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Wed, 22 May 2019 14:14:13 GMT</pubDate>
            <atom:updated>2019-05-22T14:35:59.907Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Spring Boot Security LDAP Example]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codeops/spring-boot-security-ldap-example-1ce1bdfc5816?source=rss----9edb68504a10---4"><img src="https://cdn-images-1.medium.com/max/600/0*pd9mGzghuA5II0E3" width="600"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/codeops/spring-boot-security-ldap-example-1ce1bdfc5816?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/spring-boot-security-ldap-example-1ce1bdfc5816?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/1ce1bdfc5816</guid>
            <category><![CDATA[spring-mvc]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-security]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[ldap]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Tue, 21 May 2019 20:54:49 GMT</pubDate>
            <atom:updated>2023-05-12T07:28:26.428Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Configuration Management in SpringBoot Cloud with Kubernetes ConfigMap]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codeops/configuration-management-in-springboot-cloud-with-kubernetes-configmap-b1f180fbdfec?source=rss----9edb68504a10---4"><img src="https://cdn-images-1.medium.com/max/782/1*Gciaqo8lK_-1DieJxdhL3g.png" width="782"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/codeops/configuration-management-in-springboot-cloud-with-kubernetes-configmap-b1f180fbdfec?source=rss----9edb68504a10---4">Continue reading on CodeOps »</a></p></div>]]></description>
            <link>https://medium.com/codeops/configuration-management-in-springboot-cloud-with-kubernetes-configmap-b1f180fbdfec?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/b1f180fbdfec</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Wed, 03 Apr 2019 12:13:45 GMT</pubDate>
            <atom:updated>2019-03-31T17:37:39.844Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Assigning K8s Pods to a Specific Worker Node]]></title>
            <link>https://medium.com/codeops/assigning-k8s-pods-to-a-specific-worker-node-baf713488831?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/baf713488831</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Mon, 11 Mar 2019 08:52:24 GMT</pubDate>
            <atom:updated>2019-03-11T08:52:24.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*WCsqMt85nMP0DvYv0JnkOA.png" /></figure><p>Sometime last year, we were faced with a situation where we needed to deploy kubernetes containers to specific nodes in the EKS cluster. Well, luckily for us kubernetes had a feature like that: just a simple command. We will be going what I did to get this up.</p><blockquote>Note: This session assumes you already have a basic understanding of Kubernetes pod and your cluster is setup.If not follow the getting starting guideline <a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html">here</a></blockquote><h4>Create Labels for Worker Nodes</h4><p>There are various ways of handling this including <em>NodeSelector</em>, <em>In-Built Node Label</em> among <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">others</a>. We will be using the NodeSelctor for this session. The <em>NodeSelector </em>specifies a map of key-value pairs which is attached to a specific node. For the pod to be assigned to a node, the pod must have each of the indicated key-value pairs as labels as node selectors configured in the deployment manifest. To assign a label to a node, see below</p><p><strong>Get the list of Nodes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*12C2lGFTu5wGsHnXcgQACA.png" /><figcaption>kubectl get nodes</figcaption></figure><p><strong>Set Labels</strong></p><pre>kubectl label node ip-192-168-173-183.us-west-2.compute.internal  app_name=employee-management env=uat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*ezusfDqzu7Qce5lGbZ_vcg.png" /></figure><h4>Configure NodeSelector on Pod</h4><pre>apiVersion: extensions/v1beta1<br>kind: Deployment<br>metadata:<br>  name: employee-managment<br>spec:<br>  replicas: 2<br>  template:<br>    metadata:<br>      labels:<br>        app: employee-managment<br>    spec:<br>      containers:<br>      - name: employee-managment<br>        image: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/employee-app:59d48ede0fa538a062d3a54f6a2a1f6913d59ff1<br>        ports:<br>        - containerPort: 9000<br>      nodeSelector:<br>        app_name: employee-managment<br>        env: uat</pre><p>Above will create deployment and assign the pods to nodes <em>ip-192–168–173–183.us-west-2.compute.internal.</em> See below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*eKb3tTsV1_MO2pS3UbLtnA.png" /><figcaption>kubectl get pods</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*kSrKAMKRyvmLrSt-JzYJ4A.png" /><figcaption>kubectl describe pod employee-managment-5bbc4dd596–5ktlr</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*eKb3tTsV1_MO2pS3UbLtnA.png" /></figure><p>This is awesome.thank you for reading :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baf713488831" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codeops/assigning-k8s-pods-to-a-specific-worker-node-baf713488831">Assigning K8s Pods to a Specific Worker Node</a> was originally published in <a href="https://medium.com/codeops">CodeOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing Weave CNI on AWS EKS]]></title>
            <link>https://medium.com/codeops/installing-weave-cni-on-aws-eks-51c2e6b7abc8?source=rss----9edb68504a10---4</link>
            <guid isPermaLink="false">https://medium.com/p/51c2e6b7abc8</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Samuel Addico]]></dc:creator>
            <pubDate>Sun, 10 Mar 2019 10:00:12 GMT</pubDate>
            <atom:updated>2023-03-01T18:43:52.615Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>In this article, I will be demonstrating how to opt-out using AWS VPC CNI plugin and installing an overlay network plugin such as Weave CNI plugin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*uBNaBmHTXhu2fSUNcRyDrg.png" /></figure><h4>What is AWS EKS?</h4><p>Amazon launched its managed kubernetes service: <a href="https://aws.amazon.com/eks/">EKS</a>, sometime last year 2018. Eager to put on my learning hats and brave the scars of living on the cutting edge, I decided to jump on this train. I must confess <a href="https://aws.amazon.com/eks/">AWS EKS</a> is really handy as it eliminates all the hardships (especially the networking bit of K8s) involved in setting up your own K8s cluster and the operations of having to manage it.</p><p>One of the interesting features of EKS for which I am often inclined to it is how it simplifies the Kubernetes network stack (basically pod networking) and enables micro-segmentation across security groups. using its pre-configured CNI plugin: <a href="https://github.com/aws/amazon-vpc-cni-k8s">AWS’s VPC CNI</a>. What this means is your pods are assigned IPs as though they were EC2 instances and also could have some security rules applies. A few advantages here</p><ul><li>Pod network connectivity performance is similar to AWS VPC Network. That is, low latency, minimal jitter, high throughput, and high availability</li><li>Users will be able to express and enforce granular network policies and isolation comparable to those achievable with native EC2 networking and security groups</li><li>Network operation is simple and secure. You don’t incur the overhead of encapsulation and de-encapsulation as you do with Overlay networks such as Flannel, Calico etc.</li><li><a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html">VPC Flow Logs</a> is can be enabled and works</li><li>VPC Routing Policies works, traffic from the VPC can be directly routed to pods.</li><li>There’s less contention for network bandwidth because fewer pods are sharing an <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html">Elastic Network Interface</a> (ENI)</li></ul><blockquote>By the way, this plugin is open-sourced to boot</blockquote><h4>So what is the Problem?</h4><p>The VPC CNI plugin has its own set of challenges, however. For example, the EC2 instance type and size determine the number of pods you can run on an instance. And there are situations where attaining higher pod density will force you to over-provision the instance types you use for your worker nodes. Your VPC may also be so IP constrained that you cannot afford to assign an IP address from your VPC to your pods, though the <a href="https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html">VPC CNI custom networking</a> feature attempts to address this by allowing you to specify a separate set of subnets for your pod network. Despite the VPC CNI’s advantages, folks may still want to use another CNI with EKS for various reason such as the one just explained above.</p><h4>Disable AWS CNI</h4><pre>kubectl delete ds aws-node -n kube-system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*MrfSsNpgvKAh4EI7z-MRbQ.png" /><figcaption>kubectl get pods — all-namespaces</figcaption></figure><h4>Installing CNI-Genie</h4><p>So well like I aforesaid, we will be disabling the AWS VPC CNI and install our preferred network overlay Weave CNI. But before doing that, we need to install <a href="https://github.com/Huawei-PaaS/CNI-Genie">CNI-Genie</a>. CNI-Genie is a CNI plugin that enables Kubernetes to simultaneously have access to different implementations of the Kubernetes network model in runtime. CNI-Genie also supports assigning multiple IP addresses to a pod, each from a different CNI plugin.</p><blockquote>Note you need to set up only the master node without joining the worker nodes till you are done with the installation.</blockquote><pre>kubectl apply -f https://raw.githubusercontent.com/Huawei-PaaS/CNI-Genie/master/conf/1.8/genie-plugin.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*swCFb0dlhuWzDZAtx30EnQ.png" /></figure><h4>Installing Weave CNI Plugin</h4><p>Now that we have installed cni-genie plugin we are ready to install the Weave plugin.</p><pre>kubectl apply -f &quot;<a href="https://www.google.com/url?q=https://cloud.weave.works/k8s/net?k8s-version%3D%24(kubectl&amp;sa=D&amp;ust=1524760785241000&amp;usg=AFQjCNF4lxXiYNW0iq1-mOap4Wr7Ei9-YA">https://cloud.weave.works/k8s/net?k8s-version=$(kubectl</a> version | base64 | tr -d &#39;\n&#39;)&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*_ydjCucC3sh0WmvUxDkGIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*5jMPljlHrSrDOS5-dNqb1w.png" /><figcaption>kubectl get daemonset weave-net — namespace kube-system</figcaption></figure><p>As you can see the counts are all showing 0 because we have got not worker node attached.</p><h4>Launch EKS Worker Nodes</h4><p>Now you can proceed with creating the worker nodes and joining them to the master. Because this post is not about setup the EKS cluster, I won&#39;t be going through this. However, AWS has well detailed a guideline for launching the worker node <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html">here</a> . Once this is done, you should see output as below on running below command :</p><pre>kubectl get pods --all-namespaces</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*nnyrKcUttC_YSNa3G-fChA.png" /><figcaption>kubectl get pods — all-namespaces</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*IsmEki5vuNfVZ0-mOmmmYQ.png" /><figcaption>kubectl get daemonset weave-net — namespace kube-system</figcaption></figure><p>As you can see, all our pods are running fine now. Now let try deploy an application and see it assigned an IP address by weave-net as opposed to being assigned an IP by AWS VPC.</p><pre>kubectl apply -f employee-mngt-deployment.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*F50LMEH3R6WiuJpi0K0oQQ.png" /><figcaption>kubectl get pods</figcaption></figure><p>Now let confirm if weave assigned an IP</p><pre>kubectl describe pod employee-managment-6d66594b86-8xbhp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*kSrKAMKRyvmLrSt-JzYJ4A.png" /><figcaption>kubectl describe pod employee-managment-6d66594b86–8xbhp</figcaption></figure><p>Add there we have it, 10.40.0.2 was assigned.</p><p><em>Thanks for reading this far. If you found this post helpful, I’d really appreciate it if you recommend this post (by clicking the clap button) so others can find it too! Also, follow me on </em><a href="https://medium.com/@samaddico"><em>Medium</em></a><em>. Thanks again !!</em></p><h4>References</h4><ul><li><a href="https://www.contino.io/insights/kubernetes-is-hard-why-eks-makes-it-easier-for-network-and-security-architects">Kubernetes Is Hard: Why EKS Makes It Easier for Network and Security...</a></li><li><a href="https://medium.com/@jeremy.i.cowan/running-flannel-on-eks-9a2f7a285a23">Running Flannel on EKS</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c2e6b7abc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codeops/installing-weave-cni-on-aws-eks-51c2e6b7abc8">Installing Weave CNI on AWS EKS</a> was originally published in <a href="https://medium.com/codeops">CodeOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>