Skip to content

Commit 7890135

Browse files
committed
Apply suggestions
1 parent 5f98e58 commit 7890135

File tree

1 file changed

+26
-27
lines changed
  • pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-sysctl-parameters-on-nodes

1 file changed

+26
-27
lines changed

pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-sysctl-parameters-on-nodes/guide.en-gb.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ updated: 2025-01-13
99
The OVHcloud Managed Kubernetes service gives you access to Kubernetes clusters, without the hassle of installing or operating them.
1010
But for some specific usecases, you may have to customize nodes parameters.
1111

12-
This guide will cover the modification of the Sysctl parameters which takes in charge the Inotify part and allows you to open more files simultaneously.
13-
12+
This guide will cover the customization of the sysctl parameters which define user limits on the number of inotify resources and inotify file watches.
1413
## Requirements
1514

1615
- A [Public Cloud project](/links/public-cloud/public-cloud) in your OVHcloud account
@@ -30,29 +29,29 @@ Create a YAML named `sysctl-tuner-daemonset.yaml` with the content below:
3029
apiVersion: apps/v1
3130
kind: DaemonSet
3231
metadata:
33-
name: sysctl-tuner
32+
name: sysctl-tuner
3433
spec:
35-
selector:
36-
matchLabels:
37-
name: sysctl-tuner
38-
template:
39-
metadata:
40-
labels:
41-
name: sysctl-tuner
42-
spec:
43-
containers:
44-
- name: sysctl
45-
image: busybox
46-
securityContext:
47-
privileged: true
48-
command:
49-
- sh
50-
- -c
51-
- "sysctl -w fs.inotify.max_user_watches=<value>" # Define the value you need
52-
hostNetwork: true
53-
hostPID: true
54-
tolerations:
55-
- operator: "Exists" # Allow running on all nodes, including tainted ones
34+
selector:
35+
matchLabels:
36+
name: sysctl-tuner
37+
template:
38+
metadata:
39+
labels:
40+
name: sysctl-tuner
41+
spec:
42+
containers:
43+
- name: sysctl
44+
image: busybox
45+
securityContext:
46+
privileged: true
47+
command:
48+
- sh
49+
- -c
50+
- "sysctl -w fs.inotify.max_user_watches=<value>" # Define the value you need
51+
hostNetwork: true
52+
hostPID: true
53+
tolerations:
54+
- operator: "Exists" # Allow running on all nodes, including tainted ones
5655
```
5756
5857
Define the value of the sysctl key `fs.inotify.max_user_watches` based on your applications' needs.
@@ -67,19 +66,19 @@ The DaemonSet will set the sysctl parameter `fs.inotify.max_user_watches` with t
6766
> $ kubectl run busybox --image=busybox:latest --rm=true -it --privileged=true -- sysctl -a
6867
> ```
6968
>
70-
> This command will create a privileged busybox pod, will print all "sysctl" variables then delete the pod.
69+
> This command will create a privileged busybox pod that prints all available sysctl values and deletes the pod.
7170

7271
## Step 2: Test if the changes were applied correctly
7372

74-
In order to check if the Inotify value has been changed properly, you can escalate a shell into a pod :
73+
In order to check if the inotify value has been changed properly, you can execute a shell into a pod:
7574

7675
```bash
7776
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
7877
```
7978

8079
The output should be the same as the value you defined in the DaemonSet YAML defined above.
8180

82-
Congratulations ! You've successfully modified the maximum Inotify "max_user_watches" value on your Managed Kubernetes Service.
81+
Congratulations! You've successfully modified the maximum inotify "max_user_watches" value on your Managed Kubernetes Service.
8382

8483
## Go further
8584

0 commit comments

Comments
 (0)