File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -118,19 +118,20 @@ apt-mark hold kubelet kubeadm kubectl
118
118
systemctl daemon-reload
119
119
systemctl start kubelet
120
120
systemctl enable kubelet.service
121
-
122
121
```
123
- ## exit as root user & execute the below commands as normal ubuntu user
124
- ``` sh
125
- sudo su - ubuntu
126
- ```
127
-
128
122
## Initialised the control plane.
129
123
``` sh
130
- # Initialize Kubernates master by executing below commond.
131
-
124
+ # Initialize Kubernetes control plane by running the below commond as root user.
132
125
sudo kubeadm init
126
+ ```
133
127
128
+ ## exit as root user
129
+ ``` sh
130
+ sudo su - ubuntu
131
+ ```
132
+
133
+ ## execute the below commands as a normal ubuntu user
134
+ ``` sh
134
135
mkdir -p $HOME /.kube
135
136
sudo cp -i /etc/kubernetes/admin.conf $HOME /.kube/config
136
137
sudo chown $( id -u) :$( id -g) $HOME /.kube/config
@@ -155,6 +156,15 @@ kubeadm join 172.31.10.12:6443 --token cdm6fo.dhbrxyleqe5suy6e \
155
156
--discovery-token-ca-cert-hash sha256:1fc51686afd16c46102c018acb71ef9537c1226e331840e7d401630b96298e7d
156
157
```
157
158
158
-
159
+ ## Generate the master join token on the master node
160
+ ``` sh
161
+ kubeadm token create --print-join-command
162
+ ```
163
+ ## Copy the token and run it on worker nodes to add them to the control plane
164
+ # Replace the token below with yours. This step is important when you restart your nodes
165
+ ``` sh
166
+ kubeadm join 172.31.10.12:6443 --token cdm6fo.dhbrxyleqe5suy6e \
167
+ --discovery-token-ca-cert-hash sha256:1fc51686afd16c46102c018acb71ef9537c1226e331840e7d401630b96298e7d
168
+ ```
159
169
160
170
You can’t perform that action at this time.
0 commit comments