fix windows parm values and herestring
parent
a7be480b2c
commit
31f985a30d
|
@ -172,10 +172,10 @@ cfssl gencert \
|
||||||
#### Windows
|
#### Windows
|
||||||
```
|
```
|
||||||
cfssl gencert `
|
cfssl gencert `
|
||||||
-ca=ca.pem `
|
-ca ca.pem `
|
||||||
-ca-key=ca-key.pem `
|
-ca-key ca-key.pem `
|
||||||
-config=ca-config.json `
|
-config ca-config.json `
|
||||||
-profile=kubernetes `
|
-profile kubernetes `
|
||||||
admin-csr.json | cfssljson -bare admin
|
admin-csr.json | cfssljson -bare admin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -233,40 +233,40 @@ done
|
||||||
#### Windows
|
#### Windows
|
||||||
|
|
||||||
```
|
```
|
||||||
@('worker-0', 'worker-1', 'worker-2') | ForEach-Object {
|
@('worker-0', 'worker-1', 'worker-2') | ForEach-Object {
|
||||||
New-Item $_-csr.json -Value @"
|
New-Item $_-csr.json -Value @"
|
||||||
{
|
{
|
||||||
"CN": "system:node:$_",
|
"CN": "system:node:$_",
|
||||||
"key": {
|
"key": {
|
||||||
"algo": "rsa",
|
"algo": "rsa",
|
||||||
"size": 2048
|
"size": 2048
|
||||||
},
|
},
|
||||||
"names": [
|
"names": [
|
||||||
{
|
{
|
||||||
"C": "US",
|
"C": "US",
|
||||||
"L": "Portland",
|
"L": "Portland",
|
||||||
"O": "system:nodes",
|
"O": "system:nodes",
|
||||||
"OU": "Kubernetes The Hard Way",
|
"OU": "Kubernetes The Hard Way",
|
||||||
"ST": "Oregon"
|
"ST": "Oregon"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
"@
|
"@
|
||||||
|
|
||||||
$EXTERNAL_IP=$(gcloud compute instances describe $_ `
|
$EXTERNAL_IP=$(gcloud compute instances describe $_ `
|
||||||
--format 'value(networkInterfaces[0].accessConfigs[0].natIP)')
|
--format 'value(networkInterfaces[0].accessConfigs[0].natIP)')
|
||||||
|
|
||||||
$INTERNAL_IP=$(gcloud compute instances describe $_ `
|
$INTERNAL_IP=$(gcloud compute instances describe $_ `
|
||||||
--format 'value(networkInterfaces[0].networkIP)')
|
--format 'value(networkInterfaces[0].networkIP)')
|
||||||
|
|
||||||
cfssl gencert `
|
cfssl gencert `
|
||||||
-ca ca.pem `
|
-ca ca.pem `
|
||||||
-ca-key ca-key.pem `
|
-ca-key ca-key.pem `
|
||||||
-config ca-config.json `
|
-config ca-config.json `
|
||||||
-hostname $_,$EXTERNAL_IP,$INTERNAL_IP `
|
-hostname $_,$EXTERNAL_IP,$INTERNAL_IP `
|
||||||
-profile kubernetes `
|
-profile kubernetes `
|
||||||
$_-csr.json | cfssljson -bare $_
|
$_-csr.json | cfssljson -bare $_
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
|
Loading…
Reference in New Issue