<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kubernetes on Random Musings</title><link>https://chengl.com/tags/kubernetes/</link><description>Recent content in Kubernetes on Random Musings</description><generator>Hugo</generator><language>en-us</language><copyright>Cheng Long</copyright><lastBuildDate>Sun, 30 Jul 2017 16:00:13 +0000</lastBuildDate><atom:link href="https://chengl.com/tags/kubernetes/index.xml" rel="self" type="application/rss+xml"/><item><title>Keeping configurations sane for multiple projects on Google Container Engine</title><link>https://chengl.com/post/working-with-multiple-projects-on-gke/</link><pubDate>Sat, 18 Feb 2017 09:27:00 +0000</pubDate><guid>https://chengl.com/post/working-with-multiple-projects-on-gke/</guid><description>&lt;p&gt;In my &lt;a href="https://chengl.com/kubectl-authentication-made-simple/"&gt;previous post&lt;/a&gt;, I present the easist and most secure way to get &lt;code&gt;kubectl&lt;/code&gt; working for one project. But what about mutiple projects? Juggle mutiple projects on Google Container Engine (GKE) can be hard, especially when its configurations are admittedly &lt;a href="https://github.com/kubernetes/kubernetes/issues/20605"&gt;quirky&lt;/a&gt;. This post describes the best practice, in my opinion, to keep configurations sane and easy to switch.&lt;/p&gt;
&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Suppose you have an awesome app that runs on GKE. You probably want to have two different environments &lt;code&gt;staging&lt;/code&gt; and &lt;code&gt;production&lt;/code&gt;, and the environments should be completely isolated. So you create two projects on GKE, &lt;code&gt;awesome-app-staging&lt;/code&gt; and &lt;code&gt;awesome-app-production&lt;/code&gt;, and provisioned resources for each. Now the question is how to effectively switch between the two projects on command line without repeating &lt;a href="https://github.com/kubernetes/kubernetes/issues/20605#issuecomment-218322105"&gt;these commands&lt;/a&gt; over and over again.&lt;/p&gt;</description></item><item><title>kubectl Authentication Made Simple</title><link>https://chengl.com/post/kubectl-authentication-made-simple/</link><pubDate>Mon, 30 Jan 2017 09:25:00 +0000</pubDate><guid>https://chengl.com/post/kubectl-authentication-made-simple/</guid><description>&lt;p&gt;While working on a continuous delivery pipeline to automate deployment to Google Container Engine (GKE), I found that getting &lt;code&gt;kubectl&lt;/code&gt; to work is very &lt;a href="https://kubernetes.io/docs/user-guide/sharing-clusters/#manually-generating-kubeconfig"&gt;complex&lt;/a&gt;&lt;a href="http://stackoverflow.com/questions/40426071/kubectl-access-to-google-cloud-container-engins-fails"&gt;and&lt;/a&gt;&lt;a href="http://stackoverflow.com/questions/40408321/whats-the-cli-authentication-process-as-of-google-container-engine-kubernetes-1"&gt;convoluted&lt;/a&gt;, especially when it needs to be &lt;a href="https://circleci.com/docs/continuous-deployment-with-google-container-engine/"&gt;noninteractive&lt;/a&gt;. So I want to find out the easiest way to get &lt;code&gt;kubectl&lt;/code&gt; working noninteractively.&lt;/p&gt;
&lt;p&gt;Assuming that &lt;code&gt;gcloud&lt;/code&gt; and &lt;code&gt;kubectl&lt;/code&gt; are already installed but not necessarily setup, &lt;strong&gt;ONLY&lt;/strong&gt; two commands are needed to get &lt;code&gt;kubectl&lt;/code&gt; working noninteractively (verified with Google Cloud SDK 141.0.0 and kubectl 1.5.2)&lt;/p&gt;</description></item><item><title>Orchestrating Docker with Kubernetes</title><link>https://chengl.com/post/orchestrating-docker-with-kubernetes/</link><pubDate>Sun, 15 May 2016 09:04:00 +0000</pubDate><guid>https://chengl.com/post/orchestrating-docker-with-kubernetes/</guid><description>&lt;p&gt;This is my second post on Docker orchestration. In &lt;a href="https://chengl.com/orchestrating-docker-using-swarm/"&gt;the first post&lt;/a&gt;, I demonstrated orchestrating Docker with Swarm, Machine, Compose and Consul. This post is to demonstrate orchestrating the same app with Kubernetes and draw comparisons between them. I recommend reading &lt;a href="https://chengl.com/orchestrating-docker-using-swarm/"&gt;that post&lt;/a&gt; before this.&lt;/p&gt;
&lt;h3 id="introduction-to-kubernetes"&gt;Introduction to Kubernetes&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Kubernetes is an open-source system for automating deployment, operations, and scaling of containerized applications.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;It groups containers that make up an application into logical units for easy management and discovery. Kubernetes builds upon &lt;a href="http://queue.acm.org/detail.cfm?id=2898444"&gt;a decade and a half of experience of running production workloads at Google&lt;/a&gt;, combined with best-of-breed ideas and practices from the community.&lt;/p&gt;</description></item></channel></rss>