<?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[Stories by Sugendh K Ganga on Medium]]></title>
        <description><![CDATA[Stories by Sugendh K Ganga on Medium]]></description>
        <link>https://medium.com/@sugendhkganga?source=rss-352da4d0852d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*or2Bu-c7u69yr9_R</url>
            <title>Stories by Sugendh K Ganga on Medium</title>
            <link>https://medium.com/@sugendhkganga?source=rss-352da4d0852d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 02:38:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sugendhkganga/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A CI/CD pipeline to deploy containerized applications to Kubernetes using Bamboo — Part 2]]></title>
            <link>https://medium.com/@sugendhkganga/a-ci-cd-pipeline-to-deploy-containerized-applications-to-kubernetes-using-bamboo-part-2-d53c9d97fb63?source=rss-352da4d0852d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d53c9d97fb63</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[continous-integration]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[bamboo]]></category>
            <dc:creator><![CDATA[Sugendh K Ganga]]></dc:creator>
            <pubDate>Tue, 31 Jul 2018 16:19:45 GMT</pubDate>
            <atom:updated>2018-08-01T05:21:26.062Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@sugendhkganga/analyzing-kubernetes-capabilities-of-bamboo-part-1-8bf8c2069b98">Previous iteration</a> of this article portrayed a high level overview of how to implement a CI/CD pipeline to deploy containerized applications to Kubernetes. In this post, I will walk you through the steps to get your first pipeline up and running.</p><h3>Prerequisites</h3><ol><li>Bamboo Server</li></ol><p>2. A Kubernetes cluster (I created mine on Azure — AKS)</p><p>3. An Ubuntu machine which will serve as a remote agent to bamboo machine.</p><p>4. A containerised application ready for deployment to Kubernetes. We are going to use <a href="https://helm.sh/"><em>helm</em></a> for deployment. <a href="https://github.com/HM-demo/Dot-Net-core-apps-to-k8s-Bamboo.git">Click here to view the sample code</a></p><p>5. A <a href="https://hub.docker.com/"><em>Docker hub</em></a> account, which will serve as an image registry. Private registries such as <em>nexus</em> <em>repository manager</em>, <em>AWS ECR or </em><a href="https://docs.microsoft.com/en-in/azure/container-registry/"><em>Azure container registry</em></a> can be used if needed.</p><p><em>6.</em> A private helm repository to which helm packages from the build will be pushed. We used a <em>helm-local</em> repo in <a href="https://github.com/kubernetes/charts/tree/master/stable/artifactory"><em>Jfrog Artifactory</em></a></p><h3>Promotion Model</h3><p>Before we get into creating <em>build plan</em> and <em>deployment project</em>, let’s consider the promotion model. Typically, there’s <em>Dev -&gt; Test -&gt; Staging -&gt; Prod</em> or something similar. In the case of <em>Kubernetes</em>, <a href="https://kubernetes.io/docs/getting-started-guides/minikube/"><em>minikube</em></a>/<em>docker</em> host is the local <em>development</em> environment.</p><p>So what about <em>Staging</em> &amp; <em>Prod</em>? You could spin up separate clusters, but that could end up being expensive. <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"><em>Namespaces</em></a> in <em>Kubernetes</em> can be security boundaries, but they can also be isolation boundaries.</p><p>When you spin up a <em>Kubernetes</em> cluster, besides <em>kube-system</em> and <em>kube-public</em> namespaces (which house the k8s pods) there is a “<em>default</em>” namespace. If you don’t specify otherwise, any <em>services</em>, <em>deployments</em> or <em>pods</em> you create will go to this <em>namespace</em>.</p><p>We don’t have to create these <em>namespaces</em> beforehand, because our pipeline will create them if not already created.</p><p>Now that we have what we need, let’s get started!</p><h3>Continuous Integration</h3><p>Let’s create a build plan in bamboo. We need to link a repository to the plan. I used <em>Github</em>. Next page will ask you, where to run this build. Select ‘<em>agent environment</em>’ and click on <em>create</em> button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*Enr5G-lz7o35nKyyH30ytw.jpeg" /></figure><p>Clicking on ‘<em>configure plan</em>’ button will take you to the <em>plan configuration </em>page. Click on default job to add tasks to this job.</p><p>Now, Start adding tasks, first of which is <em>source code check out</em>. This task clones your already <em>linked repository</em> to build plan’s <em>workspace.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*C56rP6wRUQLSqVfaLMxFmg.jpeg" /></figure><p>Next compile your code by running a <em>script task (shell)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*1ODJ1sQuXFDL2tg2VG1aSw.jpeg" /></figure><p>Next add a <em>Docker</em> task to build the <em>Docker</em> image from <em>Dockerfile.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*cjNAcjfVMWr53ONB9y5mNw.jpeg" /></figure><p>Next add another <em>Docker</em> task to run the <em>Docker</em> containers to bring up the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*oKdGvU1EqkcRTla8eFV5rQ.jpeg" /></figure><p>Next, we can perform tests if any. We can add another <em>script task</em> and can call any script or can have it run as <em>inline script</em> similar to the previous (<em>script</em>) tasks.</p><p>Now, configure a <em>Docker</em> <em>task</em> to push the images to <em>Docker</em> registry (<em>dockerhub</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*GS_WB-0rEq6696i-bT7h9A.jpeg" /></figure><p>Next, configure a task to update the <em>helm chart</em> version. A <em>shell</em> script which does this can be found in <em>github</em> repository. Configure the task as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*ZBprofjlcFPOvyS5nmAW6w.jpeg" /></figure><p>Next, configure another script task that will package the helm chart so that it can be published to a private helm repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*ddSd9uuBq_N_q-4cn0G8bA.jpeg" /></figure><p>Finally, configure another task to publish the <em>helm</em> package to a private <em>helm repository</em> (<em>Jfrog Artifactory</em>).</p><p>Also, create <em>plan variables</em> if any under <em>Plan configuration</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*wt4T7Sd_AF_jk_M1OUgzBA.jpeg" /></figure><h3>Continuous Delivery</h3><p>Now, Let’s create a <em>Bamboo deployment project</em> to manage deploying <em>helm releases</em> to our <em>Kubernetes</em> cluster. Name it accordingly and link it to the <em>build plan</em> that we just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*TPuEjhIMmcY3phaaAd0FJA.jpeg" /></figure><p>Now, let’s add our first <em>environment</em> to the newly created <em>deployment project.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*kfsPIIaC07AoKL_RvRulBQ.jpeg" /></figure><p>Next task is to set up tasks in our newly created environment, so that it deploys the application to the corresponding <em>Kubernetes</em> environment. Click on ‘<em>Set up tasks’</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*xqnOrGYL9L0vSoo7N8g22A.jpeg" /></figure><p>Configure a task as shown below to deploy the latest <em>helm release</em> to the <em>test</em> environment. This is performed by a script in the <em>github</em> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*pp5e-fa28MnPZefAGzMgyQ.jpeg" /></figure><p>Save it and proceed forward to add a trigger to deploy the <em>release</em> as soon as the <em>build</em> is succeeded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*VDVIVGOfB95Zv1olhXe9kw.jpeg" /></figure><p>Finally, create following variables to complete the <em>test</em> <em>environment</em> configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*TXfTmKAThixgLudHRUM1dg.jpeg" /></figure><p>Create two more <em>environments</em> (<em>Staging &amp; Production</em>), with similar configurations. Choose a <em>trigger</em> to automatically deploy the release to <em>staging</em> on a successful deployment to the previous <em>environment (test)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*MLCajT4FuId2BK4YINm4Kg.jpeg" /></figure><p>And when it comes to <em>production environment</em>, let’s not create any <em>triggers</em> so that deployments to <em>production environments</em> will have to be done manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*qZfBT7vWmptTnV8RooWepg.jpeg" /><figcaption><em>deployment project — Configuration</em></figcaption></figure><h3>Trigger your first build!</h3><p>Now, it’s time that we finally trigger our first <em>build</em>.</p><p>Any new commit to the repository will trigger a build, or you can manually trigger the <em>build plan</em>.</p><p>The build on successful completion will trigger a <em>helm release</em> to the test environment which on completion will trigger a deployment to the <em>staging environment</em>.</p><p>You can then manually promote the <em>build</em> to <em>production environment</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*LVtHi1p-l_07seapuvnfGQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EbBoPIlaatojjv6wKM1WA.jpeg" /></figure><p>Now let’s <em>ssh</em> into our agent machine and see the deployed <em>helm releases</em>.</p><p>Running ‘<em>helm ls’ </em>will give you a list of deployed <em>helm releases</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*pq3t0ytED60VyDzE0G--SQ.jpeg" /><figcaption>Deployed resources on <em>test</em> environment</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*6yTOvXzomUzcIK6drcSp5g.jpeg" /><figcaption>Deployed resources on <em>staging</em> environment</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*cFpqpF0gJj85h-baWOqPYA.jpeg" /><figcaption>Deployed resources on <em>Production</em> environment</figcaption></figure><p>The <em>hello-world</em> application can be accessed at the three <em>external IP</em> addresses (<em>port: 8080</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PlSst496nTSpOEDw8rG9Ew.jpeg" /><figcaption>Sample .net core application</figcaption></figure><h3>What Next?</h3><p>Now that you have successfully deployed your application, how do you keep track of all your releases?</p><p>Don’t you think it’s important to monitor your Kubernetes cluster? What about intrusion prevention? What if the cluster runs out of resources? How important is cluster security?</p><p>All these questions will be answered in Part 3 of this article! Until next time, Keep learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d53c9d97fb63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing Kubernetes Capabilities of Bamboo — Part 1]]></title>
            <link>https://medium.com/@sugendhkganga/analyzing-kubernetes-capabilities-of-bamboo-part-1-8bf8c2069b98?source=rss-352da4d0852d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bf8c2069b98</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bamboo]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Sugendh K Ganga]]></dc:creator>
            <pubDate>Tue, 31 Jul 2018 10:34:24 GMT</pubDate>
            <atom:updated>2018-08-01T05:33:09.003Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you a <em>DevOps</em> enthusiast?</p><p>If yes, chances are containers &amp; <a href="https://kubernetes.io/">Kubernetes</a> are going to be among your best friends at office, if not just yet.</p><p><em>Kubernetes</em> is an open-source system for automating deployment, scaling, and management of containerized applications.</p><p>Since we are <em>DevOps</em> engineers, <em>Kubernetes</em> alone is not going to serve the purpose. <em>CI/CD</em> tools are an integral part of <em>DevOps Practice</em>. We have multiple options when it comes to capable tools in this segment, but for now we are going to stick to <a href="https://www.atlassian.com/software/bamboo"><em>Atlassian Bamboo</em></a> and analyse, how it fares against other market leaders like <a href="https://jenkins.io/"><em>Jenkins</em></a> &amp; <a href="https://visualstudio.microsoft.com/team-services/"><em>VSTS</em></a> when it comes to managing applications on a <em>Kubernetes</em> Cluster.</p><p><em>Bamboo</em> is a widely recognised <em>Continuous Integration/Delivery</em> tool, and is used by many organisations for dictating the lifecycle of their applications. But does it give you ‘out of the box’ solution to manage deployments to a <em>Kubernetes</em> cluster? Answer is a staggering “No!”. On the contrary, Microsoft’s <em>VSTS</em> has complete integration with <em>Kubernetes</em>, should you need to create a <em>build and release pipeline</em> for any <em>Kubernetes</em> deployment. It allows secure storage of <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/"><em>kubeconfig</em></a> file and provides a service endpoint to talk to the cluster.</p><p>That being said, it doesn’t mean that <em>Bamboo</em> can’t do it, it sure can.</p><p>Now, that’s a bit confusing! Yes, <em>Bamboo</em> does not provide any integrated plugins/tasks for interacting with <em>Kubernetes</em>. That’s why I said, it does not provide any out of the box solution when it comes to talking to <em>Kubernetes</em>. But, it has the capability to have dedicated <em>remote agents</em> for any given <em>Build Plan/Project</em> or <em>Deployment Project</em>. You now know where I’m going with this, don’t you?</p><p>You can create a dedicated agent for the entire pipeline and configure it with all the binaries (<a href="https://kubernetes.io/docs/reference/kubectl/overview/"><em>Kubectl</em></a><em> &amp; </em><a href="https://helm.sh/"><em>Helm</em></a>) that you need, to interact with <em>Kubernetes</em> Clusters. You should also import your <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/"><em>kubeconfig</em></a> file to this remote agent so that it can talk to the cluster. In short, all the magic is going to happen in this machine that is pre-configured to talk to your <em>Kubernetes</em> Cluster.</p><p>Next, we create a <em>build plan</em> in <em>Bamboo</em> which is synonymous with the term <em>continuous integration</em>. Then, a <em>deployment project</em> which takes care of <em>continuous delivery</em>.</p><p>Below is a high level block diagram of the <em>CI/CD</em> pipeline that we are going to set up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_fh2dsxizGoM4woxpZCxPQ.jpeg" /><figcaption>A CI/CD pipeline to deploy containerized applications on Kubernetes using Bamboo — Overview</figcaption></figure><p><a href="https://medium.com/@sugendhkganga/a-ci-cd-pipeline-to-deploy-containerized-applications-to-kubernetes-using-bamboo-part-2-d53c9d97fb63">Part 2</a> of this article will walk you through step by step procedure to create a <em>Bamboo</em> build plan and deployment project to build &amp; deploy a sample Asp.Net core application to <em>Kubernetes</em>.</p><p>Once your application goes live, how do you keep track of all the releases? Don’t you think it’s important to monitor your Kubernetes cluster? What about intrusion prevention? What if the cluster runs out of resources? How important is cluster security? All these questions will be answered in Part 3 of this article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bf8c2069b98" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>