Tanumoy Ghosh:
General Query on kube-apiserver
Sometimes after modifying the kube-apiserver.yaml, apiserver pod is not coming up
mv /etc/kubernetes/manifest/kube-apiserver.yaml /etc/kubernetes
vi /etc/kubernetes/kube-apiserver.yaml
cp /etc/kubernetes/kube-apiserver.yaml /etc/kubernetes/manifest
Am I doing it in correct way, please suggest.
unnivkn:
@Tanumoy Ghosh If it is not coming up, then something wrong with your update. kube-apiserver.yaml is very sensitive. Even a space may sometimes effect it.
unnivkn:
I used to do like this:
cp /etc/kubernetes/manifests/kube-apiserver.yaml ~/1-kube-apiserver.yaml.orig
vim /etc/kubernetes/manifests/kube-apiserver.yaml
In case if you need to stop & start kube-apiserver:
cd /etc/kubernetes/manifests
mv kube-apiserver.yaml …
mv …/kube-apiserver.yaml .
If kube-apiserver is not coming up after modifications & normal wait time, then check the logs(below is an example):
controlplane $ cd /var/log/pods/kube-system_kube-apiserver-controlplane_80ec794cc4ee54b7604a6564c4e2604b/
controlplane $ ls
kube-apiserver
controlplane $ cd kube-apiserver/
controlplane $ ls
0.log
controlplane $
Tanumoy Ghosh:
Thanks for your reply, basically the steps you have mentioned is the same as I am using, so that ensures I’m doing the things correctly.
• I have only added PodSecurityPolicy to --enable-admission-plugins
and followed the steps as you have mentioned above, but apiserver never came up; hoping my luck won’t be that bad in exam terminal
• In old lab version (I mean for Mock Exam 1 & 2) - I can’t find pods
folder created under /var/log
unnivkn:
hope you have created the psp k apply -f …. . I think the log folder may be created, when ever there is any start up issue with kube apiserver(not sure though). Please mimic the similar issue and check you can find the log or not