diff --git a/third_party/kubeadm/app/constants/constants.go b/third_party/kubeadm/app/constants/constants.go index b3559734a3..fe76720c74 100644 --- a/third_party/kubeadm/app/constants/constants.go +++ b/third_party/kubeadm/app/constants/constants.go @@ -18,7 +18,6 @@ package constants import ( "fmt" - "io/ioutil" "net" "os" "path" @@ -564,7 +563,7 @@ func CreateTempDirForKubeadm(kubernetesDir, dirName string) (string, error) { return "", errors.Wrapf(err, "failed to create directory %q", tempDir) } - tempDir, err := ioutil.TempDir(tempDir, dirName) + tempDir, err := os.MkdirTemp(tempDir, dirName) if err != nil { return "", errors.Wrap(err, "couldn't create a temporary directory") }