kubernetes: vSphere cloud provider broken with controller-manager v1.9.0

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened: controller-manager crashes with error client_builder.go:273] ServiceAccount "vSphere-cloud-provider" is invalid: metadata.name: Invalid value: "vSphere-cloud-provider": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

What you expected to happen: I expected the controller-manager to launch without issue.

How to reproduce it (as minimally and precisely as possible): Launch a controller-manager with a cloud-config per VMware documentation.

Anything else we need to know?: Root cause appears to be here. Perhaps lowercasing the ā€˜S’ will solve this?

Environment:

  • Kubernetes version (use kubectl version): v1.9.0
  • Cloud provider or hardware configuration: vsphere
  • OS (e.g. from /etc/os-release): Ubuntu 17.10
  • Kernel (e.g. uname -a): Linux 4.9.61
  • Install tools:
  • Others:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (9 by maintainers)

Commits related to this issue

Most upvoted comments

This worked for me on a 1.9.2 cluster

cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: vsphere-cloud-provider
rules:
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list", "watch"]

---

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: vsphere-cloud-provider
  namespace: kube-system
roleRef:  
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: vsphere-cloud-provider
subjects:
- kind: ServiceAccount
  name: vsphere-cloud-provider
  namespace: kube-system
EOF