mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
don't try to remove the node if kubeconfig doesn't exist
This commit is contained in:
committed by
George Kraft
parent
258ee22858
commit
6e831d6fe9
@@ -152,7 +152,8 @@ def shutdown():
|
|||||||
- stop the kube-proxy service
|
- stop the kube-proxy service
|
||||||
- remove the 'kubernetes-worker.cni-plugins.installed' state
|
- remove the 'kubernetes-worker.cni-plugins.installed' state
|
||||||
'''
|
'''
|
||||||
kubectl('delete', 'node', gethostname())
|
if os.path.isfile(kubeconfig_path):
|
||||||
|
kubectl('delete', 'node', gethostname())
|
||||||
service_stop('kubelet')
|
service_stop('kubelet')
|
||||||
service_stop('kube-proxy')
|
service_stop('kube-proxy')
|
||||||
remove_state('kubernetes-worker.cni-plugins.installed')
|
remove_state('kubernetes-worker.cni-plugins.installed')
|
||||||
|
Reference in New Issue
Block a user