From 63d6e7cd9f6f6a7311501b4a182b09c301d3da75 Mon Sep 17 00:00:00 2001 From: Richard Larocque Date: Thu, 13 Nov 2014 15:53:19 -0800 Subject: [PATCH] make-cert.sh: Create directory before writing cert Adds a "mkdir -p" to the make-cert.sh. This fixes an issue where the script could fail if /srv/kubernetes did not exist previously. --- cluster/saltbase/salt/generate-cert/make-cert.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster/saltbase/salt/generate-cert/make-cert.sh b/cluster/saltbase/salt/generate-cert/make-cert.sh index f878486bc6cd6..36f7d9d4f0196 100755 --- a/cluster/saltbase/salt/generate-cert/make-cert.sh +++ b/cluster/saltbase/salt/generate-cert/make-cert.sh @@ -17,6 +17,8 @@ cert_dir=/srv/kubernetes cert_file_owner=apiserver.apiserver +mkdir -p "$cert_dir" + openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ -subj "/CN=kubernetes.invalid/O=Kubernetes" \ -keyout "${cert_dir}/server.key" -out "${cert_dir}/server.cert"