mirror of https://github.com/k3s-io/k3s
don't try to remove the node if kubeconfig doesn't exist
parent
258ee22858
commit
6e831d6fe9
|
@ -152,7 +152,8 @@ def shutdown():
|
|||
- stop the kube-proxy service
|
||||
- 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('kube-proxy')
|
||||
remove_state('kubernetes-worker.cni-plugins.installed')
|
||||
|
|
Loading…
Reference in New Issue