OpenShift Container Platform uses a KubeletConfig Custom Resource to manage the configuration of nodes. By creating an instance of a KubeletConfig, a managed MachineConfig is created to override setting on the node.

Logging into remote machines for the purpose of changing their configuration is not supported.

Modifying Nodes

To make configuration changes to a cluster, or MachinePool, you must create a Custom Resource Definition, or KubeletConfig instance. OpenShift Container Platform uses the Machine Config Controller to watch for changes introduced through the CRD applies the changes to the cluster.

  1. Obtain the label associated with the static CRD, Machine Config Pool, for the type of node you want to configure. Perform one of the following steps:

    1. Edit the machineconfigpool master, add label"custom-kubelet: small-pods"

      For example:

      $ oc edit machineconfigpool worker
        creationTimestamp: 2019-01-31T07:10:04Z
        generation: 3
          custom-kubelet: small-pods (1)
      1 If a label has been added it appears under labels.
    2. If the label is not present, add a key/value pair under labels.

  2. Create a Custom Resource (CR) for your configuration change.

    For example:

    Sample configuration for a max-pods CR
    kind: MachineConfigPool
      name: set-max-pods (1)
          custom-kubelet: small-pods (2)
      kubeletConfig: (3)
        maxPods: 100
    1 Assign a name to CR.
    2 Specify the label to apply the configuration change.
    3 Specify the new value(s) you want to change.
  3. Create the CR object.

    $ oc create -f <file-name>

    For example:

    $ oc create -f master-kube-config.yaml

Most KubeletConfig Options may be set by the user. The following options are not allowed to be overwritten:

  • CgroupDriver

  • ClusterDNS

  • ClusterDomain

  • RuntimeRequestTimeout

  • StaticPodPath