Remove wrapping curly brackets on commands that do not need curly brackets.
This will make the command blocks easier to copy.pull/456/head
parent
bf2850974e
commit
84e3d514f9
|
@ -9,8 +9,6 @@ In this section you will provision a Certificate Authority that can be used to g
|
||||||
Generate the CA configuration file, certificate, and private key:
|
Generate the CA configuration file, certificate, and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > ca-config.json <<EOF
|
cat > ca-config.json <<EOF
|
||||||
{
|
{
|
||||||
"signing": {
|
"signing": {
|
||||||
|
@ -47,8 +45,6 @@ cat > ca-csr.json <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cfssl gencert -initca ca-csr.json | cfssljson -bare ca
|
cfssl gencert -initca ca-csr.json | cfssljson -bare ca
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -67,8 +63,6 @@ In this section you will generate client and server certificates for each Kubern
|
||||||
Generate the `admin` client certificate and private key:
|
Generate the `admin` client certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > admin-csr.json <<EOF
|
cat > admin-csr.json <<EOF
|
||||||
{
|
{
|
||||||
"CN": "admin",
|
"CN": "admin",
|
||||||
|
@ -94,8 +88,6 @@ cfssl gencert \
|
||||||
-config=ca-config.json \
|
-config=ca-config.json \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
admin-csr.json | cfssljson -bare admin
|
admin-csr.json | cfssljson -bare admin
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -164,8 +156,6 @@ worker-2.pem
|
||||||
Generate the `kube-controller-manager` client certificate and private key:
|
Generate the `kube-controller-manager` client certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > kube-controller-manager-csr.json <<EOF
|
cat > kube-controller-manager-csr.json <<EOF
|
||||||
{
|
{
|
||||||
"CN": "system:kube-controller-manager",
|
"CN": "system:kube-controller-manager",
|
||||||
|
@ -191,8 +181,6 @@ cfssl gencert \
|
||||||
-config=ca-config.json \
|
-config=ca-config.json \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
kube-controller-manager-csr.json | cfssljson -bare kube-controller-manager
|
kube-controller-manager-csr.json | cfssljson -bare kube-controller-manager
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -208,8 +196,6 @@ kube-controller-manager.pem
|
||||||
Generate the `kube-proxy` client certificate and private key:
|
Generate the `kube-proxy` client certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > kube-proxy-csr.json <<EOF
|
cat > kube-proxy-csr.json <<EOF
|
||||||
{
|
{
|
||||||
"CN": "system:kube-proxy",
|
"CN": "system:kube-proxy",
|
||||||
|
@ -235,8 +221,6 @@ cfssl gencert \
|
||||||
-config=ca-config.json \
|
-config=ca-config.json \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
kube-proxy-csr.json | cfssljson -bare kube-proxy
|
kube-proxy-csr.json | cfssljson -bare kube-proxy
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -251,8 +235,6 @@ kube-proxy.pem
|
||||||
Generate the `kube-scheduler` client certificate and private key:
|
Generate the `kube-scheduler` client certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > kube-scheduler-csr.json <<EOF
|
cat > kube-scheduler-csr.json <<EOF
|
||||||
{
|
{
|
||||||
"CN": "system:kube-scheduler",
|
"CN": "system:kube-scheduler",
|
||||||
|
@ -278,8 +260,6 @@ cfssl gencert \
|
||||||
-config=ca-config.json \
|
-config=ca-config.json \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
kube-scheduler-csr.json | cfssljson -bare kube-scheduler
|
kube-scheduler-csr.json | cfssljson -bare kube-scheduler
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -297,8 +277,6 @@ The `kubernetes-the-hard-way` static IP address will be included in the list of
|
||||||
Generate the Kubernetes API Server certificate and private key:
|
Generate the Kubernetes API Server certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
KUBERNETES_PUBLIC_ADDRESS=$(gcloud compute addresses describe kubernetes-the-hard-way \
|
KUBERNETES_PUBLIC_ADDRESS=$(gcloud compute addresses describe kubernetes-the-hard-way \
|
||||||
--region $(gcloud config get-value compute/region) \
|
--region $(gcloud config get-value compute/region) \
|
||||||
--format 'value(address)')
|
--format 'value(address)')
|
||||||
|
@ -329,8 +307,6 @@ cfssl gencert \
|
||||||
-hostname=10.32.0.1,10.240.0.10,10.240.0.11,10.240.0.12,${KUBERNETES_PUBLIC_ADDRESS},127.0.0.1,kubernetes.default \
|
-hostname=10.32.0.1,10.240.0.10,10.240.0.11,10.240.0.12,${KUBERNETES_PUBLIC_ADDRESS},127.0.0.1,kubernetes.default \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
kubernetes-csr.json | cfssljson -bare kubernetes
|
kubernetes-csr.json | cfssljson -bare kubernetes
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
@ -347,8 +323,6 @@ The Kubernetes Controller Manager leverages a key pair to generate and sign serv
|
||||||
Generate the `service-account` certificate and private key:
|
Generate the `service-account` certificate and private key:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
|
|
||||||
cat > service-account-csr.json <<EOF
|
cat > service-account-csr.json <<EOF
|
||||||
{
|
{
|
||||||
"CN": "service-accounts",
|
"CN": "service-accounts",
|
||||||
|
@ -374,8 +348,6 @@ cfssl gencert \
|
||||||
-config=ca-config.json \
|
-config=ca-config.json \
|
||||||
-profile=kubernetes \
|
-profile=kubernetes \
|
||||||
service-account-csr.json | cfssljson -bare service-account
|
service-account-csr.json | cfssljson -bare service-account
|
||||||
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Results:
|
Results:
|
||||||
|
|
|
@ -17,7 +17,6 @@ gcloud -q compute instances delete \
|
||||||
Delete the external load balancer network resources:
|
Delete the external load balancer network resources:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule \
|
gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule \
|
||||||
--region $(gcloud config get-value compute/region)
|
--region $(gcloud config get-value compute/region)
|
||||||
|
|
||||||
|
@ -26,7 +25,6 @@ Delete the external load balancer network resources:
|
||||||
gcloud -q compute http-health-checks delete kubernetes
|
gcloud -q compute http-health-checks delete kubernetes
|
||||||
|
|
||||||
gcloud -q compute addresses delete kubernetes-the-hard-way
|
gcloud -q compute addresses delete kubernetes-the-hard-way
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Delete the `kubernetes-the-hard-way` firewall rules:
|
Delete the `kubernetes-the-hard-way` firewall rules:
|
||||||
|
@ -42,7 +40,6 @@ gcloud -q compute firewall-rules delete \
|
||||||
Delete the `kubernetes-the-hard-way` network VPC:
|
Delete the `kubernetes-the-hard-way` network VPC:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
gcloud -q compute routes delete \
|
gcloud -q compute routes delete \
|
||||||
kubernetes-route-10-200-0-0-24 \
|
kubernetes-route-10-200-0-0-24 \
|
||||||
kubernetes-route-10-200-1-0-24 \
|
kubernetes-route-10-200-1-0-24 \
|
||||||
|
@ -51,5 +48,4 @@ Delete the `kubernetes-the-hard-way` network VPC:
|
||||||
gcloud -q compute networks subnets delete kubernetes
|
gcloud -q compute networks subnets delete kubernetes
|
||||||
|
|
||||||
gcloud -q compute networks delete kubernetes-the-hard-way
|
gcloud -q compute networks delete kubernetes-the-hard-way
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue