Skip to content

Commit d475671

Browse files
authoredJan 10, 2022
Merge pull request #2 from scirelli/cgroup_memory_error
Enable Cgroups Memory
2 parents 4b52b70 + 5a4caea commit d475671

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
 

‎00-Intro.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,35 @@ Create the directories, positioned in $HOME directory.
163163

164164
```shell
165165
mkdir pki certs config bin plugins
166-
```
166+
```
167+
168+
### Enable Cgroups Memory
169+
On each worker node append `cgroup_enable=memory cgroup_memory=1` to */boot/cmdline.txt*. This needs to be run as root.
170+
```
171+
sudo su
172+
echo -n ' cgroup_enable=memory cgroup_memory=1' | tee -a /boot/cmdline.txt
173+
```
174+
175+
Then restart the node:
176+
```
177+
sudo shutdown -r 0
178+
```
179+
180+
Cgroups memory needs to be turned on, or in step 6 [Test Worker Nodes](https://github.com/abelperezok/kubernetes-raspberry-pi-cluster-hat/blob/master/06-Worker-Nodes.md#test-worker-nodes) your node status may all come up as `NotReady`.
181+
182+
After running step 6 on master:
183+
184+
```
185+
kubectl get nodes --kubeconfig config/admin.kubeconfig
186+
```
187+
188+
the statuses were all `NotReady`. Running
189+
190+
```
191+
journalctl -fu kubelet
192+
```
193+
On *p1*, showed an error:
194+
195+
> Failed to start ContainerManager system validation failed - Following Cgroup subsystem not mounted: [memory]
196+
197+
Turns out that the memory cgroup is disabled by default since it adds some [additional memory overhead](https://github.com/raspberrypi/linux/issues/1950).

‎11-References.md

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
* https://github.com/kubernetes/kubernetes/issues/26093
1414

1515
* https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=219644&p=1770842
16+
17+
* https://downey.io/blog/exploring-cgroups-raspberry-pi/
18+
19+
* https://github.com/kubernetes-sigs/kubespray/issues/1227

0 commit comments

Comments
 (0)