mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-15 01:08:58 +03:00
chg: Hostnames In Documentation
Changed server to controlplane and node-0 to node01, and node-1 to node02 in the documentation. Also started reformatting to limit lines to 80 characters. Added a section on how to enable to root account for login.
This commit is contained in:
@@ -12,10 +12,10 @@ When generating kubeconfig files for Kubelets the client certificate matching th
|
||||
|
||||
> The following commands must be run in the same directory used to generate the SSL certificates during the [Generating TLS Certificates](04-certificate-authority.md) lab.
|
||||
|
||||
Generate a kubeconfig file for the `node-0` and `node-1` worker nodes:
|
||||
Generate a kubeconfig file for the `node01` and `node02` worker nodes:
|
||||
|
||||
```bash
|
||||
for host in node-0 node-1; do
|
||||
for host in node01 node02; do
|
||||
kubectl config set-cluster kubernetes-the-hard-way \
|
||||
--certificate-authority=ca.crt \
|
||||
--embed-certs=true \
|
||||
@@ -41,8 +41,8 @@ done
|
||||
Results:
|
||||
|
||||
```text
|
||||
node-0.kubeconfig
|
||||
node-1.kubeconfig
|
||||
node01.kubeconfig
|
||||
node02.kubeconfig
|
||||
```
|
||||
|
||||
### The kube-proxy Kubernetes Configuration File
|
||||
@@ -184,10 +184,10 @@ admin.kubeconfig
|
||||
|
||||
## Distribute the Kubernetes Configuration Files
|
||||
|
||||
Copy the `kubelet` and `kube-proxy` kubeconfig files to the `node-0` and `node-1` machines:
|
||||
Copy the `kubelet` and `kube-proxy` kubeconfig files to the `node01` and `node02` machines:
|
||||
|
||||
```bash
|
||||
for host in node-0 node-1; do
|
||||
for host in node01 node02; do
|
||||
ssh root@${host} "mkdir -p /var/lib/{kube-proxy,kubelet}"
|
||||
|
||||
scp kube-proxy.kubeconfig \
|
||||
|
||||
Reference in New Issue
Block a user