diff --git a/pkg/webhook/server.go b/pkg/webhook/server.go index 68a8e7dd65..816ebbcf4a 100644 --- a/pkg/webhook/server.go +++ b/pkg/webhook/server.go @@ -22,6 +22,7 @@ import ( "fmt" "net" "net/http" + "os" "path" "path/filepath" "strconv" @@ -85,7 +86,7 @@ func (s *Server) setDefaults() { } if len(s.CertDir) == 0 { - s.CertDir = path.Join("/tmp", "k8s-webhook-server", "serving-certs") + s.CertDir = path.Join(os.TempDir(), "k8s-webhook-server", "serving-certs") } }