Skip to content

Commit 2d0bde0

Browse files
neolit123Tim Bannister
andauthored
kubeadm: add TS guide note about CoreOS read-only /usr (#19166)
* kubeadm: add TS guide note about CoreOS read-only /usr * Update content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md Co-Authored-By: Tim Bannister <[email protected]> Co-authored-by: Tim Bannister <[email protected]>
1 parent 1513a7b commit 2d0bde0

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,46 @@ There are at least two workarounds:
319319
```bash
320320
kubectl taint nodes NODE_NAME role.kubernetes.io/master:NoSchedule-
321321
```
322+
323+
## `/usr` is mounted read-only on nodes {#usr-mounted-read-only}
324+
325+
On Linux distributions such as Fedora CoreOS, the directory `/usr` is mounted as a read-only filesystem.
326+
For [flex-volume support](https://github.com/kubernetes/community/blob/ab55d85/contributors/devel/sig-storage/flexvolume.md),
327+
Kubernetes components like the kubelet and kube-controller-manager use the default path of
328+
`/usr/libexec/kubernetes/kubelet-plugins/volume/exec/`, yet the flex-volume directory _must be writeable_
329+
for the feature to work.
330+
331+
To workaround this issue you can configure the flex-volume directory using the kubeadm
332+
[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2).
333+
334+
On the primary control-plane Node (created using `kubeadm init`) pass the following
335+
file using `--config`:
336+
337+
```yaml
338+
apiVersion: kubeadm.k8s.io/v1beta2
339+
kind: InitConfiguration
340+
nodeRegistration:
341+
kubeletExtraArgs:
342+
volume-plugin-dir: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
343+
---
344+
apiVersion: kubeadm.k8s.io/v1beta2
345+
kind: ClusterConfiguration
346+
controllerManager:
347+
extraArgs:
348+
flex-volume-plugin-dir: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
349+
```
350+
351+
On joining Nodes:
352+
353+
```yaml
354+
apiVersion: kubeadm.k8s.io/v1beta2
355+
kind: JoinConfiguration
356+
nodeRegistration:
357+
kubeletExtraArgs:
358+
volume-plugin-dir: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
359+
```
360+
361+
Alternatively, you can modify `/etc/fstab` to make the `/usr` mount writeable, but please
362+
be advised that this is modifying a design principle of the Linux distribution.
363+
322364
{{% /capture %}}

0 commit comments

Comments
 (0)