cilium-cli icon indicating copy to clipboard operation
cilium-cli copied to clipboard

Error: Unable to install Cilium: invalid cluster name

Open akoserwal opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What happened?

~ cilium install ℹ️ using Cilium version "v1.11.3" 🔮 Auto-detected cluster name: api-mk-c9cm59nafa3h-dlin-s1-devshift-org:6443 🔮 Auto-detected IPAM mode: cluster-pool ❌ Cluster name "api-mk-c9cm59nafa3h-dlin-s1-devshift-org:6443" is not valid, must match regular expression: ^a-z0-9$

Cilium Version

cilium-cli: v0.11.1 compiled with go1.18.1 on darwin/amd64 cilium image (default): v1.11.3 cilium image (stable): v1.11.3 cilium image (running): unknown. Unable to obtain cilium version, no cilium pods found in namespace "kube-system"

Kernel Version

Darwin Kernel Version RELEASE_X86_64

Kubernetes Version

Openshift dedicated stable-4.10

Sysdump

No response

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

akoserwal avatar Apr 15 '22 13:04 akoserwal

I think the solution might require CLI to discover that cilium is being deployed to openshift

alexander-demicev avatar May 12 '22 09:05 alexander-demicev

The cluster name is invalid because it ends with :6443, which is invalid for a DNS sub-domain (see RFC1123). Try removing the port section from your domain name.

rolinh avatar May 12 '22 10:05 rolinh

Never mind my previous comment, looks like the cluster name is being discovered from the current context of the kubeconfig.

contexts:
- context:
    cluster: mycluster
    user: myuser
  name: myuser
current-context: myuser

Issue might be resolved by checking that the cluster name contains a valid name in both contexts and clusters section of the kubeconfig.

alexander-demicev avatar May 12 '22 10:05 alexander-demicev