Skip to main content

5.2.4.1. Node marking

This section covers marking and restricting control plane nodes. It describes how to assign the control-plane role to a node and apply a taint that prevents scheduling workload pods on master nodes. These actions are necessary to ensure isolation of control plane components and to comply with the cluster architecture model.

Node marking and restriction

● Required

Note

This section describes the cluster configuration that allows you to set the container scheduling policy in advance and ensure isolation of the control plane from unplanned workloads.

export HOST_NAME=master-1

Environment variables

export CLUSTER_NAME=my-first-cluster
export BASE_DOMAIN=example.com
export FULL_HOST_NAME=${HOST_NAME}.${CLUSTER_NAME}.${BASE_DOMAIN}

Node labeling

kubectl label node ${FULL_HOST_NAME} node-role.kubernetes.io/control-plane="" \
--kubeconfig=/etc/kubernetes/super-admin.conf
note
node/master-1.my-first-cluster.example.com labeled

Node tainting

kubectl taint node ${FULL_HOST_NAME} node-role.kubernetes.io/control-plane="":NoSchedule \
--overwrite \
--kubeconfig=/etc/kubernetes/super-admin.conf
note
node/master-1.my-first-cluster.example.com modified