Feature Request.
Hello, thanks so much for the code, I've found it very helpful in standing up a kubernetes cluster. I'd like to request (and hopefully contribute if you're open to the feature) the ability to set the address for both kube-controller-manager and kube-scheduler to something like address=0.0.0.0 during the kubeadm init command.
Use-case: As part of standing up the cluster, I also wanted to monitor the cluster with prometheus. Specifically, I wanted to monitor the cluster by taking advantage of https://github.com/coreos/prometheus-operator. The manifests that come with the kube-prometheus section of this code attempt to setup targets for the kube-controller-manager and kube-scheduler. By default, these target fail on startup because they are not addressable.
As a workaround to this issue, I have to manually modify the manifests in /etc/kubernetes/manifests/ and then manually restart the kubelet service on the master. If init ever runs again, it will overwrite these settings (or, as noted by #541 during an upgrade).
I have a couple of ideas on how to do this, but I would love feedback from someone more familiar with the codebase.
manifest directory that kubeadm should search when creating default services. This would be something like kubeadm init --manifest-directory /path/to/my/custom/manifests which would search the /path/to/my/custom/manifests directory for files that would change the default etc, kube-apiserver, kube-controller-manager.yaml, or kube-scheduler files. --controller-manager-address=0.0.0.0 and --scheduler-address=0.0.0.0. I would assume this is less preferred. You can already do this with the config file: https://kubernetes.io/docs/reference/generated/kubeadm/#config-file
Cheers!
Oh, woops thanks!
@luxas 404
@delfer here is the updated link. https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file
@loganasherjones I have't see any parameter to change --address for kube-controller-manager or kube-scheduler
Well done!
On existing cluster:
kubectl -n kube-system edit cm kubeadm-config
add to data->MasterConfiguration
controllerManagerExtraArgs:
address: 0.0.0.0
schedulerExtraArgs:
address: 0.0.0.0
On master node:
vim /etc/kubernetes/manifests/kube-controller-manager.yaml
vim /etc/kubernetes/manifests/kube-scheduler.yaml
and set --address=0.0.0.0
then
systemctl restart kubelet
Most helpful comment
Well done!
On existing cluster:
kubectl -n kube-system edit cm kubeadm-configadd to data->MasterConfiguration
On master node:
vim /etc/kubernetes/manifests/kube-controller-manager.yamlvim /etc/kubernetes/manifests/kube-scheduler.yamland set
--address=0.0.0.0then
systemctl restart kubelet