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 nodesnote the correct ouput. - for sanity,
netstat -tulpnnote kube-apiserv on 6443 vi /etc/kubernetes/manifests/kube-apiserver.jsonand 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 nodeswill 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)
@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=falseto testI 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}')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.