Handle default cri socket path in docker

Use /var/run/dockershim.sock for default
pull/7780/head
Anders F Björklund 2020-04-19 16:07:09 +02:00
parent 5f86da5b54
commit e726215974
1 changed files with 3 additions and 0 deletions

View File

@ -621,6 +621,9 @@ func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error {
ka := bsutil.InvokeKubeadm(k8s.KubernetesVersion)
sp := cr.SocketPath()
if sp == "" {
sp = kconst.DefaultDockerCRISocket
}
cmd := fmt.Sprintf("%s reset --cri-socket %s --force", ka, sp)
if version.LT(semver.MustParse("1.11.0")) {
cmd = fmt.Sprintf("%s reset --cri-socket %s", ka, sp)