Kubernetes: how to properly change apiserver runtime settings

12/10/2017

I'm using kube-aws to run a Kubernetes cluster on AWS, and everything works as expected.

Now, I realize that cron jobs aren't turned on in the version I'm using (v1.7.10_coreos.0), while the documentation for Kubernetes only states the following:

For previous versions of cluster (< 1.8) you need to explicitly enable batch/v2alpha1 API by passing --runtime-config=batch/v2alpha1=true to the API server (see Turn on or off an API version for your cluster for more).

And the documentation directed to in that text only states this (it's the actual, full documentation):

Specific API versions can be turned on or off by passing --runtime-config=api/ flag while bringing up the API server. For example: to turn off v1 API, pass --runtime-config=api/v1=false. runtime-config also supports 2 special keys: api/all and api/legacy to control all and legacy APIs respectively. For example, for turning off all API versions except v1, pass --runtime-config=api/all=false,api/v1=true. For the purposes of these flags, legacy APIs are those APIs which have been explicitly deprecated (e.g. v1beta3).

I have been unsuccessful in finding information about how to change the configuration of a running cluster, and I, of course, don't want to try to re-run the command on api-server.

Note that kube-aws still use hyperkube, and not kubeadm. Also, the /etc/kubernetes/manifests-directory only contains the ssl-directory.

The setting I want to apply is this: --runtime-config=batch/v2alpha1=true

What is the proper way, preferably using kubectl, to apply this setting and have the apiservers restarted?

Thanks.

-- Helge Talvik Söderström
amazon-web-services
cron
kubernetes

1 Answer

12/11/2017

batch/v2alpha1=true is set by default in kube-aws. You can find it here

-- Camil
Source: StackOverflow