<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GKE on Random Musings</title><link>https://chengl.com/tags/gke/</link><description>Recent content in GKE 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/gke/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></channel></rss>