You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/labs/kubernetes-the-hard-way/lab4-certificate-authority.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
author: Wale Soyinka
3
-
contributors: Steven Spencer
3
+
contributors: Steven Spencer, Ganna Zhyrnova
4
4
tags:
5
5
- kubernetes
6
6
- k8s
@@ -9,7 +9,7 @@ tags:
9
9
10
10
# Lab 4: Provisioning a CA and Generating TLS Certificates
11
11
12
-
In this lab you will provision a [PKI Infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure) using openssl to bootstrap a Certificate Authority, and generate TLS certificates for the following components:
12
+
In this lab, you will provision a [PKI Infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure) using OpenSSL to bootstrap a Certificate Authority and generate TLS certificates for the following components:
13
13
14
14
* kube-apiserver
15
15
* kube-controller-manager
@@ -21,17 +21,17 @@ Run commands in this section from the `jumpbox`.
21
21
22
22
## Certificate Authority
23
23
24
-
In this section you will provision a Certificate Authority that you will use to generate additional TLS certificates for the other Kubernetes components. Setting up CA and generating certificates with `openssl` can be time-consuming, especially when doing it for the first time. To streamline this lab, the inclusion of an `openssl` configuration file, `ca.conf`, defines all the details needed to generate certificates for each Kubernetes component.
24
+
In this section, you will provision a Certificate Authority that you will use to generate additional TLS certificates for the other Kubernetes components. Setting up CA and generating certificates with `openssl` can be time-consuming, especially when doing it for the first time. To streamline this lab, an `openssl` configuration file, `ca.conf`, must be included, which defines all the details needed to generate certificates for each Kubernetes component.
25
25
26
26
Take a moment to review the `ca.conf` configuration file:
27
27
28
28
```bash
29
29
cat ca.conf
30
30
```
31
31
32
-
You do not need to understand everything in the `ca.conf` file to complete this tutorial, but you should consider it a starting point for learning `openssl` and the configuration that goes into managing certificates at a high level.
32
+
To complete this tutorial, you do not need to understand everything in the `ca.conf` file. Still, you should consider it a starting point for learning `openssl` and the configuration that goes into managing certificates at a high level.
33
33
34
-
Every certificate authority starts with a private key and root certificate. In this section you are going to create a self-signed certificate authority, and while that is all you need for this tutorial, this is something you should not consider in a real-world production environment.
34
+
Every certificate authority starts with a private key and root certificate. In this section, you will create a self-signed certificate authority, and while that is all you need for this tutorial, this is something you should not consider in a real-world production environment.
35
35
36
36
Generate the CA configuration file, certificate, and private key:
37
37
@@ -51,11 +51,11 @@ ca.crt ca.key
51
51
52
52
!!! Tip
53
53
54
-
To view the details encoded in the generated certificate file (ca.crt), you can use this openssl command `openssl x509 -in ca.crt -text -noout | less`.
54
+
To view the details encoded in the generated certificate file (ca.crt), you can use this OpenSSL command `openssl x509 -in ca.crt -text -noout | less`.
55
55
56
56
## Create Client and Server Certificates
57
57
58
-
In this section you will generate client and server certificates for each Kubernetes component and a client certificate for the Kubernetes `admin` user.
58
+
In this section, you will generate client and server certificates for each Kubernetes component and a client certificate for the Kubernetes `admin` user.
59
59
60
60
Generate the certificates and private keys:
61
61
@@ -86,15 +86,15 @@ for i in ${certs[*]}; do
86
86
done
87
87
```
88
88
89
-
The results of running the above command will generate a private key, certificate request, and signed SSL certificate for each of the Kubernetes components. You can list the generated files with the following command:
89
+
The above command results will generate a private key, certificate request, and signed SSL certificate for each Kubernetes component. You can list the generated files with the following command:
90
90
91
91
```bash
92
92
ls -1 *.crt *.key *.csr
93
93
```
94
94
95
95
## Distribute the Client and Server Certificates
96
96
97
-
In this section you will copy the various certificates to every machine at a path where each Kubernetes component will search for its certificate pair. In a real-world environment, you would treat these certificates as a set of sensitive secrets, because Kubernetes uses these components as credentials to authenticate to each other.
97
+
In this section, you will copy the various certificates to every machine using a path where each Kubernetes component will search for its certificate pair. In a real-world environment, you would treat these certificates as a set of sensitive secrets because Kubernetes uses these components as credentials to authenticate to each other.
98
98
99
99
Copy the appropriate certificates and private keys to the `node-0` and `node-1` machines:
100
100
@@ -122,6 +122,6 @@ scp \
122
122
root@server:~/
123
123
```
124
124
125
-
> You will use the `kube-proxy`, `kube-controller-manager`, `kube-scheduler`, and `kubelet` client certificates to generate client authentication configuration files in the next lab.
125
+
In the next lab, you will use the `kube-proxy`, `kube-controller-manager`, `kube-scheduler`, and `kubelet` client certificates to generate client authentication configuration files.
126
126
127
127
Next: [Generating Kubernetes Configuration Files for Authentication](lab5-kubernetes-configuration-files.md)
0 commit comments