Skip to content

Commit d5a7e3d

Browse files
committed
Creating first draft of a new documentation about :
Modifying Sysctl parameters and more especially 'Inotify' ones for specific usecases
1 parent 5cdc2d2 commit d5a7e3d

File tree

2 files changed

+83
-0
lines changed
  • pages
    • public_cloud/containers_orchestration/managed_kubernetes/configuring-sysctl-parameters-on-nodes-on-an-ovh-managed-kubernetes-cluster

2 files changed

+83
-0
lines changed

pages/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@
867867
+ [Taint, cordon and drain specific Nodes and Nodes Pools](public_cloud/containers_orchestration/managed_kubernetes/taint-drain-node-pools)
868868
+ [Using Codefresh with OVHcloud Managed Kubernetes cluster](public_cloud/containers_orchestration/managed_kubernetes/using-codefresh)
869869
+ [Deploying Apache Pulsar on an OVHcloud Managed Kubernetes cluster](public_cloud/containers_orchestration/managed_kubernetes/installing-pulsar-with-streamnative)
870+
+ [Configuring sysctl parameters for your nodes on an OVHcloud Managed Kubernets cluster](public_cloud/containers_orchestration/managed_kubernetes/configuring-sysctl-parameters-on-nodes-on-an-ovh-managed-kubernetes-cluster)
870871
+ [Network](public-cloud-containers-orchestration-managed-kubernetes-k8s-network)
871872
+ [Using vRack Private Network](public_cloud/containers_orchestration/managed_kubernetes/using-vrack)
872873
+ [Using vRack - Communicating between different private networks](public_cloud/containers_orchestration/managed_kubernetes/using-vrack-between-private-networks)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Adapt your Inotify parameters for your deployments
3+
excerpt: 'Adapt your Inotify parameters for your deployments which needs to have specific Inotify parameters'
4+
updated: 2025-01-09
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 customize nodes parameters.
11+
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+
14+
## Requirements
15+
16+
- A [Public Cloud project](https://www.ovhcloud.com/fr/public-cloud/) in your OVHcloud account
17+
- Access to the [OVHcloud Control Panel](https://www.ovh.com/auth/?action=gotomanager&from=https://www.ovh.com/fr/&ovhSubsidiary=fr)
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+
And 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+
## Step 2: Test if the changes were applied correctly
63+
64+
In order to check if the Inotify value has been changed properly, you can escalate a shell into a pod :
65+
66+
```bash
67+
$ kubectl exec -it <pod> -- cat /proc/sys/fs/inotify/max_user_watches
68+
```
69+
70+
The output should be the same as the value you defined in the DaemonSet YAML defined above.
71+
72+
Congratulations ! You've successfully modified the maximum Inotify "max_user_watches" value on Managed Kubernetes Service.
73+
74+
## Go further
75+
76+
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).
77+
78+
- If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://www.ovhcloud.com/fr/professional-services/) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
79+
80+
- Join our [community of users](https://community.ovh.com/en/).
81+
82+

0 commit comments

Comments
 (0)