# Physical Worker Node Labeling in HPE Ezmeral Container Platform
Discovering the node properties and advertising them through node labels can be used to control workload placement in a Kubernetes cluster. With the HPE Ezmeral Container Platform running on HPE server platforms, organizations can automate the discovery of hardware properties and use that information to schedule workloads that benefit from the different capabilities that the underlying hardware provides.
HPE Ezmeral Container Platform node labeling can be applied to group nodes based on the underlying features of the nodes. By default, every node will have its node name as a label. The following properties can be used to label nodes:
Overall health status of the node: If current status of "BIOS, Fans, Temperature Sensors, Battery, Processor, Memory, Network, and Storage" is ok, node health status is labeled as "Ok". Otherwise, it will appear as "Degraded".
Overall security status of the node: If the current status of the following BIOS configuration items (which are important forsecurity) are as expected, then security status of the node is "Ok". Otherwise, they will be labeled as "Degraded".
Custom Labeling: User defined labels (key, value) are assigned to desired physical worker nodes. Users can use these Python scripts to retrieve the properties of the underlying hardware and then decide on required labels that should be assigned to each physical worker nodes.
Node labeling can be broken down into 4 main phases:
Setting up of the installer VM environment
Updating the input files with the server information
Execution of the python scripts
Verification of the pod scheduling
Below figure shows High Level steps of Node Labeling
Steps to perform Node Labeling:
Update the config.json and the hosts.json inventory file which will be used by the HPE Ezmeral Container Platform to reference the physical worker nodes.
Set up utility libraries for interfacing and managing components of HPE ProLiant Servers.
proliantutils==2.9.2
sushy==3.0.0
- Execute the python3 script using the command
> python physical_node_labelling.py
- Apply the health, security and custom labels to the nodes.
Verify Pod Scheduling using Node Selector:
View the labels of all the nodes
Select a label you wish to deploy the workload on
Eg. "health=OK"
Deploy sample application with nodeSelector value "health=OK"
Check if pod is deployed on the required node.