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

本小妞迷上赌 提交于 2019-12-07 06:24:13

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/49810966/how-to-use-kubeadm-upgrade-to-change-some-features-in-kubeadm-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!