Skip to content

Commit

Permalink
Merge pull request #4 from DenisBiondic/patch-1
Browse files Browse the repository at this point in the history
Fixed kube-proxy client certificate signing request
  • Loading branch information
ivanfioravanti authored Oct 14, 2017
2 parents 128f65c + a6f3bf6 commit 9d28803
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions docs/04-certificate-authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@ worker-2.pem
Create the `kube-proxy` client certificate signing request:

```shell
for instance in worker-0 worker-1 worker-2; do
cat > ${instance}-csr.json <<EOF
cat > kube-proxy-csr.json <<EOF
{
"CN": "system:node:${instance}",
"CN": "system:kube-proxy",
"key": {
"algo": "rsa",
"size": 2048
Expand All @@ -179,27 +178,13 @@ cat > ${instance}-csr.json <<EOF
{
"C": "US",
"L": "Portland",
"O": "system:nodes",
"O": "system:node-proxier",
"OU": "Kubernetes The Hard Way",
"ST": "Oregon"
}
]
}
EOF

EXTERNAL_IP=$(az network public-ip show -g kubernetes \
-n kubernetes-pip --query ipAddress -otsv)

INTERNAL_IP=$(az vm show -d -n ${instance} -g kubernetes --query privateIps -otsv)

cfssl gencert \
-ca=ca.pem \
-ca-key=ca-key.pem \
-config=ca-config.json \
-hostname=${instance},${EXTERNAL_IP},${INTERNAL_IP} \
-profile=kubernetes \
${instance}-csr.json | cfssljson -bare ${instance}
done
```

Generate the `kube-proxy` client certificate and private key:
Expand Down

0 comments on commit 9d28803

Please sign in to comment.