Deprecated node-role.kubernetes.io/master in cloud-controller manifest
Describe the bug
The official kube-vip-cloud-controller manifest uses deprecated node-role.kubernetes.io/master nodeAffinity key, generating a deprecation warning during deployment.
To Reproduce Steps to reproduce the behavior:
- Apply the official manifest:
kubectl apply -f https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml - Observe the warning message in the output
Expected behavior
The manifest should deploy without deprecation warnings and use the current node-role.kubernetes.io/control-plane key instead of the deprecated node-role.kubernetes.io/master.
Screenshots
serviceaccount/kube-vip-cloud-controller created
clusterrole.rbac.authorization.k8s.io/system:kube-vip-cloud-controller-role created
clusterrolebinding.rbac.authorization.k8s.io/system:kube-vip-cloud-controller-binding created
Warning: spec.template.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[1].preference.matchExpressions[0].key: node-role.kubernetes.io/master is use "node-role.kubernetes.io/control-plane" instead
deployment.apps/kube-vip-cloud-provider created
Environment (please complete the following information):
- OS/Distro: Linux
- Kubernetes Version: v1.32.2 (kind)
- Kube-vip Version: Latest from main branch manifest
Kube-vip.yaml:
The issue is in the official manifest at:
https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml
The problematic section is:
spec:
template:
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: node-role.kubernetes.io/master # <- This should be "node-role.kubernetes.io/control-plane"
operator: Exists
Additional context
Kubernetes has deprecated the node-role.kubernetes.io/master label in favor of node-role.kubernetes.io/control-plane for inclusivity and clarity. While the old label still works, it generates deprecation warnings and should be updated to follow current best practices. This is a simple fix that would improve the user experience by eliminating unnecessary warnings.