kubeadm: kubeapi server does not restart after manifest edit

as per comments in: https://github.com/kubernetes/kubernetes/issues/34307

you should be able to edit /etc/kubernetes/manifests/kube-apiserver.json to add arguments that you need in it. (like args from http://kubernetes.io/docs/admin/kube-apiserver/)

in K8s / Kubeadm 1.4 I can do this w/o issue. editing manifest will auto update kube-api server.

but in 1.6, ANY edit to manifest fails to restart api-server

TO VERIFY: install k8s cluster via kubeadm guide: http://kubernetes.io/docs/getting-started-guides/kubeadm/ install weave: https://www.weave.works/docs/net/latest/kube-addon/

  • after installation, run kubectl get nodes note the correct ouput.
  • for sanity, netstat -tulpn note kube-apiserv on 6443
  • vi /etc/kubernetes/manifests/kube-apiserver.json and then add a valid arg to kube-api server --service-node-port-range=30000-32767. save and quit
  • notice kube-api server is no longer running…and kubectl get nodes will not work anymore.

as i said, in kubeadm 1.4 this wasnt an issue, i can edit the manfiest and it works fine with the new manifest information…just not the latest (1.6)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 10
  • Comments: 32 (10 by maintainers)

Most upvoted comments

@luxas this is still happening for me with kubeadm and Kubernetes 1.10

I have exactly the same problem. I am using kubeadm 1.5.1

@luxas Same issue with 1.9

@luxas, after edit, it doesnt seem to run the kube-api server (its missing) it ran originally. after removing the added new arg, i can see kube-api server started up fresh.

p.s i added flag --profiling=false to test

I am on Kubernetes 1.11 and I have the same issue or worse - I mean any change (even of timestamp) on /etc/kubernetes/manifests/kube-apiserver.yaml causes the api server to dye instantly and never come up again without a kubeadm init. Editing in place - VIM or nano - or editing elsewhere and copy/move over - or just “touch” - same destructive effect. Now is there a way to configure the “defaults” used by kubeadm init when re-creating this file? Thanks

@luxas I am having the same issue w/ Kubernetes 1.10.1 Can you please re-open this or give us some pointers to work around this. Thanks

Never mind, this seems to be more related to ‘in place editing of manifests’ https://github.com/kubernetes/kubernetes/issues/48219

further investigation of the failed api container: ubuntu@kube-master:/etc/kubernetes/manifests$ sudo docker logs $(sudo docker ps -a |grep k8s_kube-apiserver| awk '{print $1}')

Flag --insecure-port has been deprecated, This flag will be removed in a future version.
I0903 02:34:59.153592       1 server.go:703] external host was not specified, using 192.168.1.91
I0903 02:34:59.153921       1 server.go:145] Version: v1.11.0
Error: invalid authentication config: parse "https://sts.windows.net/ID/": first path segment in URL cannot contain colon
///
error: invalid authentication config: parse "https://sts.windows.net/ID/": first path segment in URL cannot contain colon

Dear all, does kubelet not support swagger-ui since v1.7? I added --enable-swagger-ui=true in kubelet startup args, and got unknow flag: --enable-swagger-ui After check kubelet usage, --enable-swagger-ui disappear.