Skip to content

Commit 0bf1993

Browse files
authored
Merge pull request #7385 from ovh/dev/trotsaer/mks_change_inotify_for_applications
Creating : Modify sysctl parameters for specific usecases on MKS
2 parents 96aef08 + e1066b4 commit 0bf1993

File tree

17 files changed

+1353
-0
lines changed

17 files changed

+1353
-0
lines changed

pages/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@
876876
+ [Taint, cordon and drain specific Nodes and Nodes Pools](public_cloud/containers_orchestration/managed_kubernetes/taint-drain-node-pools)
877877
+ [Using Codefresh with OVHcloud Managed Kubernetes cluster](public_cloud/containers_orchestration/managed_kubernetes/using-codefresh)
878878
+ [Deploying Apache Pulsar on an OVHcloud Managed Kubernetes cluster](public_cloud/containers_orchestration/managed_kubernetes/installing-pulsar-with-streamnative)
879+
+ [Adapt your Inotify parameters for your deployments](public_cloud/containers_orchestration/managed_kubernetes/configuring-sysctl-parameters-on-nodes)
879880
+ [Network](public-cloud-containers-orchestration-managed-kubernetes-k8s-network)
880881
+ [Using vRack Private Network](public_cloud/containers_orchestration/managed_kubernetes/using-vrack)
881882
+ [Using vRack - Communicating between different private networks](public_cloud/containers_orchestration/managed_kubernetes/using-vrack-between-private-networks)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Adapt your Inotify parameters for your Managed Kubernetes Service deployments
3+
excerpt: 'Adapt your Inotify parameters for your deployments which need specific Inotify parameters'
4+
updated: 2025-01-24
5+
---
6+
7+
## Objective
8+
9+
The OVHcloud Managed Kubernetes service gives you access to Kubernetes clusters, without the hassle of installing or operating them.
10+
But for some specific usecases, you may have to customize nodes parameters.
11+
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.**
13+
14+
## Requirements
15+
16+
- A [Public Cloud project](/links/public-cloud/public-cloud) in your OVHcloud account
17+
- Access to the [OVHcloud Control Panel](/links/manager)
18+
- An OVHcloud Managed Kubernetes cluster
19+
- Access to your OVHcloud Managed Kubernetes cluster through the Kubeconfig file
20+
- You must have the [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/){.external} command-line tool installed
21+
- Your Kubeconfig is exported into your terminal following this guide : [Configuring Kubectl](/pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-kubectl-on-an-ovh-managed-kubernetes-cluster)
22+
23+
## Instructions
24+
25+
### Step 1: Create a privileged DaemonSet and define the value to modify
26+
27+
Create a YAML named `sysctl-tuner-daemonset.yaml` with the content below:
28+
29+
```yaml
30+
apiVersion: apps/v1
31+
kind: DaemonSet
32+
metadata:
33+
name: sysctl-tuner
34+
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
56+
```
57+
58+
Define the value of the sysctl key `fs.inotify.max_user_watches` based on your applications' needs.
59+
60+
The DaemonSet will set the sysctl parameter `fs.inotify.max_user_watches` with the value you provided in the DaemonSet configuration on all nodes deployed into your Kubernetes Cluster.
61+
62+
> [!primary]
63+
>
64+
> Multiple sysctl parameters can be modified and adapted for your use cases. You can list them by running this command :
65+
>
66+
> ```bash
67+
> $ kubectl run busybox --image=busybox:latest --rm=true -it --privileged=true -- sysctl -a
68+
> ```
69+
>
70+
> This command will create a privileged busybox pod that prints all available sysctl values and deletes the pod.
71+
72+
## Step 2: Test if the changes were applied correctly
73+
74+
In order to check if the inotify value has been changed properly, you can execute a shell into a pod:
75+
76+
```bash
77+
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
78+
```
79+
80+
The output should be the same as the value you defined in the DaemonSet YAML defined above.
81+
82+
Congratulations! You've successfully modified the maximum inotify "max_user_watches" value on your Managed Kubernetes Service.
83+
84+
## Go further
85+
86+
To deploy your first application on your Kubernetes cluster, we suggest you refer to our guide to [Deploying an application](/pages/public_cloud/containers_orchestration/managed_kubernetes/deploying-an-application).
87+
88+
If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
89+
90+
Join our [community of users](/links/community).
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Adapt your Inotify parameters for your Managed Kubernetes Service deployments
3+
excerpt: 'Adapt your Inotify parameters for your deployments which need specific Inotify parameters'
4+
updated: 2025-01-24
5+
---
6+
7+
## Objective
8+
9+
The OVHcloud Managed Kubernetes service gives you access to Kubernetes clusters, without the hassle of installing or operating them.
10+
But for some specific usecases, you may have to customize nodes parameters.
11+
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.**
13+
14+
## Requirements
15+
16+
- A [Public Cloud project](/links/public-cloud/public-cloud) in your OVHcloud account
17+
- Access to the [OVHcloud Control Panel](/links/manager)
18+
- An OVHcloud Managed Kubernetes cluster
19+
- Access to your OVHcloud Managed Kubernetes cluster through the Kubeconfig file
20+
- You must have the [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/){.external} command-line tool installed
21+
- Your Kubeconfig is exported into your terminal following this guide : [Configuring Kubectl](/pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-kubectl-on-an-ovh-managed-kubernetes-cluster)
22+
23+
## Instructions
24+
25+
### Step 1: Create a privileged DaemonSet and define the value to modify
26+
27+
Create a YAML named `sysctl-tuner-daemonset.yaml` with the content below:
28+
29+
```yaml
30+
apiVersion: apps/v1
31+
kind: DaemonSet
32+
metadata:
33+
name: sysctl-tuner
34+
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
56+
```
57+
58+
Define the value of the sysctl key `fs.inotify.max_user_watches` based on your applications' needs.
59+
60+
The DaemonSet will set the sysctl parameter `fs.inotify.max_user_watches` with the value you provided in the DaemonSet configuration on all nodes deployed into your Kubernetes Cluster.
61+
62+
> [!primary]
63+
>
64+
> Multiple sysctl parameters can be modified and adapted for your use cases. You can list them by running this command :
65+
>
66+
> ```bash
67+
> $ kubectl run busybox --image=busybox:latest --rm=true -it --privileged=true -- sysctl -a
68+
> ```
69+
>
70+
> This command will create a privileged busybox pod that prints all available sysctl values and deletes the pod.
71+
72+
## Step 2: Test if the changes were applied correctly
73+
74+
In order to check if the inotify value has been changed properly, you can execute a shell into a pod:
75+
76+
```bash
77+
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
78+
```
79+
80+
The output should be the same as the value you defined in the DaemonSet YAML defined above.
81+
82+
Congratulations! You've successfully modified the maximum inotify "max_user_watches" value on your Managed Kubernetes Service.
83+
84+
## Go further
85+
86+
To deploy your first application on your Kubernetes cluster, we suggest you refer to our guide to [Deploying an application](/pages/public_cloud/containers_orchestration/managed_kubernetes/deploying-an-application).
87+
88+
If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
89+
90+
Join our [community of users](/links/community).
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Adapt your Inotify parameters for your Managed Kubernetes Service deployments
3+
excerpt: 'Adapt your Inotify parameters for your deployments which need specific Inotify parameters'
4+
updated: 2025-01-24
5+
---
6+
7+
## Objective
8+
9+
The OVHcloud Managed Kubernetes service gives you access to Kubernetes clusters, without the hassle of installing or operating them.
10+
But for some specific usecases, you may have to customize nodes parameters.
11+
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.**
13+
14+
## Requirements
15+
16+
- A [Public Cloud project](/links/public-cloud/public-cloud) in your OVHcloud account
17+
- Access to the [OVHcloud Control Panel](/links/manager)
18+
- An OVHcloud Managed Kubernetes cluster
19+
- Access to your OVHcloud Managed Kubernetes cluster through the Kubeconfig file
20+
- You must have the [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/){.external} command-line tool installed
21+
- Your Kubeconfig is exported into your terminal following this guide : [Configuring Kubectl](/pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-kubectl-on-an-ovh-managed-kubernetes-cluster)
22+
23+
## Instructions
24+
25+
### Step 1: Create a privileged DaemonSet and define the value to modify
26+
27+
Create a YAML named `sysctl-tuner-daemonset.yaml` with the content below:
28+
29+
```yaml
30+
apiVersion: apps/v1
31+
kind: DaemonSet
32+
metadata:
33+
name: sysctl-tuner
34+
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
56+
```
57+
58+
Define the value of the sysctl key `fs.inotify.max_user_watches` based on your applications' needs.
59+
60+
The DaemonSet will set the sysctl parameter `fs.inotify.max_user_watches` with the value you provided in the DaemonSet configuration on all nodes deployed into your Kubernetes Cluster.
61+
62+
> [!primary]
63+
>
64+
> Multiple sysctl parameters can be modified and adapted for your use cases. You can list them by running this command :
65+
>
66+
> ```bash
67+
> $ kubectl run busybox --image=busybox:latest --rm=true -it --privileged=true -- sysctl -a
68+
> ```
69+
>
70+
> This command will create a privileged busybox pod that prints all available sysctl values and deletes the pod.
71+
72+
## Step 2: Test if the changes were applied correctly
73+
74+
In order to check if the inotify value has been changed properly, you can execute a shell into a pod:
75+
76+
```bash
77+
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
78+
```
79+
80+
The output should be the same as the value you defined in the DaemonSet YAML defined above.
81+
82+
Congratulations! You've successfully modified the maximum inotify "max_user_watches" value on your Managed Kubernetes Service.
83+
84+
## Go further
85+
86+
To deploy your first application on your Kubernetes cluster, we suggest you refer to our guide to [Deploying an application](/pages/public_cloud/containers_orchestration/managed_kubernetes/deploying-an-application).
87+
88+
If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
89+
90+
Join our [community of users](/links/community).
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Adapt your Inotify parameters for your Managed Kubernetes Service deployments
3+
excerpt: 'Adapt your Inotify parameters for your deployments which need specific Inotify parameters'
4+
updated: 2025-01-24
5+
---
6+
7+
## Objective
8+
9+
The OVHcloud Managed Kubernetes service gives you access to Kubernetes clusters, without the hassle of installing or operating them.
10+
But for some specific usecases, you may have to customize nodes parameters.
11+
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.**
13+
14+
## Requirements
15+
16+
- A [Public Cloud project](/links/public-cloud/public-cloud) in your OVHcloud account
17+
- Access to the [OVHcloud Control Panel](/links/manager)
18+
- An OVHcloud Managed Kubernetes cluster
19+
- Access to your OVHcloud Managed Kubernetes cluster through the Kubeconfig file
20+
- You must have the [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/){.external} command-line tool installed
21+
- Your Kubeconfig is exported into your terminal following this guide : [Configuring Kubectl](/pages/public_cloud/containers_orchestration/managed_kubernetes/configuring-kubectl-on-an-ovh-managed-kubernetes-cluster)
22+
23+
## Instructions
24+
25+
### Step 1: Create a privileged DaemonSet and define the value to modify
26+
27+
Create a YAML named `sysctl-tuner-daemonset.yaml` with the content below:
28+
29+
```yaml
30+
apiVersion: apps/v1
31+
kind: DaemonSet
32+
metadata:
33+
name: sysctl-tuner
34+
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
56+
```
57+
58+
Define the value of the sysctl key `fs.inotify.max_user_watches` based on your applications' needs.
59+
60+
The DaemonSet will set the sysctl parameter `fs.inotify.max_user_watches` with the value you provided in the DaemonSet configuration on all nodes deployed into your Kubernetes Cluster.
61+
62+
> [!primary]
63+
>
64+
> Multiple sysctl parameters can be modified and adapted for your use cases. You can list them by running this command :
65+
>
66+
> ```bash
67+
> $ kubectl run busybox --image=busybox:latest --rm=true -it --privileged=true -- sysctl -a
68+
> ```
69+
>
70+
> This command will create a privileged busybox pod that prints all available sysctl values and deletes the pod.
71+
72+
## Step 2: Test if the changes were applied correctly
73+
74+
In order to check if the inotify value has been changed properly, you can execute a shell into a pod:
75+
76+
```bash
77+
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
78+
```
79+
80+
The output should be the same as the value you defined in the DaemonSet YAML defined above.
81+
82+
Congratulations! You've successfully modified the maximum inotify "max_user_watches" value on your Managed Kubernetes Service.
83+
84+
## Go further
85+
86+
To deploy your first application on your Kubernetes cluster, we suggest you refer to our guide to [Deploying an application](/pages/public_cloud/containers_orchestration/managed_kubernetes/deploying-an-application).
87+
88+
If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
89+
90+
Join our [community of users](/links/community).

0 commit comments

Comments
 (0)