<p>I've used <code>curl -sS https://get.k8s.io | bash</code> to create a cluster on Google Compute Engine using Kubernetes 1.2.4. This worked great. I wanted to enable ABAC authorization mode by adding a few flags to the <code>kube-apiserver</code> command specified in kube-apiserver pod spec.</p>

<p>I'm unclear if I should adjust <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/saltbase" rel="nofollow">the salt files</a> once they're tar/gzipped. The salt file that the pod spec is generated from is <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest" rel="nofollow">here</a>, but editing this after the cluster is stood up has a few additional requirements:</p>

<ul>
<li>I have to unpack the salt tarball that the install script uploaded to Google Cloud Storage for me</li>
<li>Edit the salt files</li>
<li>Tar/gzip them back up, generate a new checksum file</li>
<li>Push these to GCS</li>
<li>Update <em>all</em> of the instances' kube-metadata so that <code>SALT_TAR_HASH</code> is now correct</li>
</ul>

<p>It feels like I'm going down the wrong path with this, as this also will collide with upgrades.</p>

<p>Is there a better way to configure pods, services, etc that are baked into the install script without having to do all of this?</p>

<p>The customization that is built into the install script is in the environment variables that you can set to change behavior (see <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/config-default.sh" rel="nofollow">cluster/gce/config-default.sh</a>). If overriding one of these variables doesn't work (which I believe is the case for ABAC), then your only option is to manually modify the salt files. </p>

<p>If you are comfortable building Kubernetes from source, your easiest path would be to clone the github repository at the desired release version, modify the salt files locally, and then run <code>make quick-release</code> and then <code>./cluster/kube-up.sh</code>. This will build a release (from source), bundle in your locally modified salt files, generate a checksum, upload the salt files to Google Cloud Storage, and then launch a cluster with the correct salt files &amp; checksum in your cluster.</p>

<p>If you don't want to build from source, rather than adjusting the <code>kube-env</code> metadata entry on all instances, you can fix it in the instance template and then delete each instance. They will get automatically replaced by new instances which will inherit the changes you made to the instance template. </p>

<p>Your current mechanism won't really mess with upgrades, because upgrades create a new instance template at the new version. Any changes that you've made to the old instance template (or old nodes directly) won't be carried forward to the new nodes (for better or worse). </p>
