Skip to content

Commit 9aa0e7f

Browse files
authored
Merge pull request #37952 from windsonsea/trokub
Optimize alignment in troubleshooting-kubeadm.md
2 parents 7252c48 + ec00138 commit 9aa0e7f

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ kind: ClusterRole
4343
metadata:
4444
name: kubeadm:get-nodes
4545
rules:
46-
- apiGroups:
47-
- ""
48-
resources:
49-
- nodes
50-
verbs:
51-
- get
46+
- apiGroups:
47+
- ""
48+
resources:
49+
- nodes
50+
verbs:
51+
- get
5252
---
5353
apiVersion: rbac.authorization.k8s.io/v1
5454
kind: ClusterRoleBinding
@@ -59,16 +59,16 @@ roleRef:
5959
kind: ClusterRole
6060
name: kubeadm:get-nodes
6161
subjects:
62-
- apiGroup: rbac.authorization.k8s.io
63-
kind: Group
64-
name: system:bootstrappers:kubeadm:default-node-token
62+
- apiGroup: rbac.authorization.k8s.io
63+
kind: Group
64+
name: system:bootstrappers:kubeadm:default-node-token
6565
```
6666
6767
## `ebtables` or some similar executable not found during installation
6868

6969
If you see the following warnings while running `kubeadm init`
7070

71-
```sh
71+
```console
7272
[preflight] WARNING: ebtables not found in system path
7373
[preflight] WARNING: ethtool not found in system path
7474
```
@@ -82,18 +82,18 @@ Then you may be missing `ebtables`, `ethtool` or a similar executable on your no
8282

8383
If you notice that `kubeadm init` hangs after printing out the following line:
8484

85-
```sh
85+
```console
8686
[apiclient] Created API client, waiting for the control plane to become ready
8787
```
8888

8989
This may be caused by a number of problems. The most common are:
9090

9191
- network connection problems. Check that your machine has full network connectivity before continuing.
9292
- the cgroup driver of the container runtime differs from that of the kubelet. To understand how to
93-
configure it properly see [Configuring a cgroup driver](/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/).
93+
configure it properly see [Configuring a cgroup driver](/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/).
9494
- control plane containers are crashlooping or hanging. You can check this by running `docker ps`
95-
and investigating each container by running `docker logs`. For other container runtime see
96-
[Debugging Kubernetes nodes with crictl](/docs/tasks/debug/debug-cluster/crictl/).
95+
and investigating each container by running `docker logs`. For other container runtime see
96+
[Debugging Kubernetes nodes with crictl](/docs/tasks/debug/debug-cluster/crictl/).
9797

9898
## kubeadm blocks when removing managed containers
9999

@@ -204,21 +204,21 @@ in kube-apiserver logs. To fix the issue you must follow these steps:
204204

205205
1. Backup and delete `/etc/kubernetes/kubelet.conf` and `/var/lib/kubelet/pki/kubelet-client*` from the failed node.
206206
1. From a working control plane node in the cluster that has `/etc/kubernetes/pki/ca.key` execute
207-
`kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf`.
208-
`$NODE` must be set to the name of the existing failed node in the cluster.
209-
Modify the resulted `kubelet.conf` manually to adjust the cluster name and server endpoint,
210-
or pass `kubeconfig user --config` (it accepts `InitConfiguration`). If your cluster does not have
211-
the `ca.key` you must sign the embedded certificates in the `kubelet.conf` externally.
207+
`kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf`.
208+
`$NODE` must be set to the name of the existing failed node in the cluster.
209+
Modify the resulted `kubelet.conf` manually to adjust the cluster name and server endpoint,
210+
or pass `kubeconfig user --config` (it accepts `InitConfiguration`). If your cluster does not have
211+
the `ca.key` you must sign the embedded certificates in the `kubelet.conf` externally.
212212
1. Copy this resulted `kubelet.conf` to `/etc/kubernetes/kubelet.conf` on the failed node.
213213
1. Restart the kubelet (`systemctl restart kubelet`) on the failed node and wait for
214-
`/var/lib/kubelet/pki/kubelet-client-current.pem` to be recreated.
214+
`/var/lib/kubelet/pki/kubelet-client-current.pem` to be recreated.
215215
1. Manually edit the `kubelet.conf` to point to the rotated kubelet client certificates, by replacing
216-
`client-certificate-data` and `client-key-data` with:
216+
`client-certificate-data` and `client-key-data` with:
217217

218-
```yaml
219-
client-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem
220-
client-key: /var/lib/kubelet/pki/kubelet-client-current.pem
221-
```
218+
```yaml
219+
client-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem
220+
client-key: /var/lib/kubelet/pki/kubelet-client-current.pem
221+
```
222222

223223
1. Restart the kubelet.
224224
1. Make sure the node becomes `Ready`.
@@ -241,7 +241,7 @@ Error from server (NotFound): the server could not find the requested resource
241241

242242
In some situations `kubectl logs` and `kubectl run` commands may return with the following errors in an otherwise functional cluster:
243243

244-
```sh
244+
```console
245245
Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc65b868-glc5m/mysql: dial tcp 10.19.0.41:10250: getsockopt: no route to host
246246
```
247247

@@ -306,15 +306,17 @@ This version of Docker can prevent the kubelet from executing into the etcd cont
306306
To work around the issue, choose one of these options:
307307

308308
- Roll back to an earlier version of Docker, such as 1.13.1-75
309-
```
310-
yum downgrade docker-1.13.1-75.git8633870.el7.centos.x86_64 docker-client-1.13.1-75.git8633870.el7.centos.x86_64 docker-common-1.13.1-75.git8633870.el7.centos.x86_64
311-
```
309+
310+
```
311+
yum downgrade docker-1.13.1-75.git8633870.el7.centos.x86_64 docker-client-1.13.1-75.git8633870.el7.centos.x86_64 docker-common-1.13.1-75.git8633870.el7.centos.x86_64
312+
```
312313

313314
- Install one of the more recent recommended versions, such as 18.06:
314-
```bash
315-
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
316-
yum install docker-ce-18.06.1.ce-3.el7.x86_64
317-
```
315+
316+
```bash
317+
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
318+
yum install docker-ce-18.06.1.ce-3.el7.x86_64
319+
```
318320

319321
## Not possible to pass a comma separated list of values to arguments inside a `--component-extra-args` flag
320322

0 commit comments

Comments
 (0)