How to Allow Unsafe Sysctls on a PMK Cluster

Problem

How to Allow Unsafe Sysctls on a PMK Cluster?

Environment

  • Platform9 Managed Kubernetes - All Versions
  • Kubelet

Procedure

  • Depending on whether the change is needed to be done on a single node or all nodes part of the cluster, refer to

How To Change Configuration for Kubelet Service on a Single Worker or Master Node in a PMK Cluster

OR

How To Change Configuration for Kubelet Service on All Worker or Master Nodes in a PMK Cluster

  • Stop the pf9-hostagent & pf9-nodeletd services on ALL the worker/master nodes depending on which configmap is being edited.
Bash
Copy
  • Edit the ConfigMap as needed and save it. Here as an example, we are editing it master-default-kubelet-config ConfigMap for the single master node cluster.
Example
Copy
  • Start the pf9-hostagent service ALL the worker/master nodes where it was initially stopped.
Bash
Copy
On Master node post-Kubelet restart (it initially always logs the default values, then loads the new config)
Copy
  • Deployed a pod with security context.
Pod Spec
Copy
  • Pod has been created and is in running state.
Example
Copy
  • If we deploy the same pod on a different cluster which does not have the Kubelet setting for allowedUnsafeSysctls added.
Example
Copy

Additional Information

Using sysctls in a Kubernetes Cluster

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard