How to use kubeadm upgrade to change some features in kubeadm-config

4/13/2018

I want to install kube-prometheus on my existing kubernetes cluster(v1.10). Before that, the doc says I need to change the ip address of contrller/scheduler from 127.0.0.1 to 0.0.0.0. And it also recommand to use kubeadm config upgrade to change these features:

controllerManagerExtraArgs:
  address: 0.0.0.0
schedulerExtraArgs:
  address: 0.0.0.0

After reading the doc, i tried with the below command, but it didn't work:

kubeadm upgrade --feature-gates controllerManagerExtraArgs.address=0.0.0.0 

I know i can use kubectl -n kube-system edit cm kubeadm-config to modify configMap directly, just want to know how to upgrade it from kubeadm upgrade

-- Feiyu Zhou
kubeadm
kubernetes
prometheus

1 Answer

4/13/2018

The only way I know of is to use the --config option.

Generate a yaml file that looks like this:

controllerManagerExtraArgs:
  address: 0.0.0.0
schedulerExtraArgs:
  address: 0.0.0.0

and then run:

kubeadm upgrade apply --config /etc/kubeadm.yaml
-- jaxxstorm
Source: StackOverflow