From 31f985a30d27c2744e4c1d05b654ff705333644f Mon Sep 17 00:00:00 2001 From: Mike Stevenson Date: Tue, 24 Oct 2017 13:22:27 -0700 Subject: [PATCH] fix windows parm values and herestring --- docs/04-certificate-authority.md | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/04-certificate-authority.md b/docs/04-certificate-authority.md index 28dc781..01ad29b 100644 --- a/docs/04-certificate-authority.md +++ b/docs/04-certificate-authority.md @@ -172,10 +172,10 @@ cfssl gencert \ #### Windows ``` cfssl gencert ` - -ca=ca.pem ` - -ca-key=ca-key.pem ` - -config=ca-config.json ` - -profile=kubernetes ` + -ca ca.pem ` + -ca-key ca-key.pem ` + -config ca-config.json ` + -profile kubernetes ` admin-csr.json | cfssljson -bare admin ``` @@ -233,40 +233,40 @@ done #### Windows ``` - @('worker-0', 'worker-1', 'worker-2') | ForEach-Object { - New-Item $_-csr.json -Value @" - { - "CN": "system:node:$_", - "key": { - "algo": "rsa", - "size": 2048 - }, - "names": [ - { - "C": "US", - "L": "Portland", - "O": "system:nodes", - "OU": "Kubernetes The Hard Way", - "ST": "Oregon" - } - ] - } - "@ +@('worker-0', 'worker-1', 'worker-2') | ForEach-Object { +New-Item $_-csr.json -Value @" +{ + "CN": "system:node:$_", + "key": { + "algo": "rsa", + "size": 2048 + }, + "names": [ + { + "C": "US", + "L": "Portland", + "O": "system:nodes", + "OU": "Kubernetes The Hard Way", + "ST": "Oregon" + } + ] +} +"@ - $EXTERNAL_IP=$(gcloud compute instances describe $_ ` - --format 'value(networkInterfaces[0].accessConfigs[0].natIP)') +$EXTERNAL_IP=$(gcloud compute instances describe $_ ` + --format 'value(networkInterfaces[0].accessConfigs[0].natIP)') - $INTERNAL_IP=$(gcloud compute instances describe $_ ` - --format 'value(networkInterfaces[0].networkIP)') +$INTERNAL_IP=$(gcloud compute instances describe $_ ` + --format 'value(networkInterfaces[0].networkIP)') - cfssl gencert ` - -ca ca.pem ` - -ca-key ca-key.pem ` - -config ca-config.json ` - -hostname $_,$EXTERNAL_IP,$INTERNAL_IP ` - -profile kubernetes ` - $_-csr.json | cfssljson -bare $_ - } +cfssl gencert ` + -ca ca.pem ` + -ca-key ca-key.pem ` + -config ca-config.json ` + -hostname $_,$EXTERNAL_IP,$INTERNAL_IP ` + -profile kubernetes ` + $_-csr.json | cfssljson -bare $_ +} ``` Results: