Skip to content

Failed to run cilium-agent as standalone process with --k8s-kubeconfig-path #11097

@brb

Description

@brb

When starting cilium-agent as a standalone process on a host which has k8s provisioned with kubeadm, the agent fails with the following error:

$ ./daemon/cilium-agent --identity-allocation-mode=crd --debug=true --enable-ipv4=true --enable-ipv6=false --disable-envoy-version-check=true --tunnel=vxlan --k8s-kubeconfig-path=/home/brb/.kube/config --kube-proxy-replacement=strict --device=vboxnet1

<..>
level=fatal msg="CRD Identity allocation mode requires k8s to be configured." subsys=daemon

The regression was introduced in #11015 (cc @raybejjani). It looks like k8s.IsEnabled() is called before k8s.Configure() which makes the cilium to crash.

One workaround (suggested by @valas) is to set the env var K8S_NODE_NAME=blah before starting the agent.

Metadata

Metadata

Assignees

Labels

kind/bugThis is a bug in the Cilium logic.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions