You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing Consul into a Kubernetes cluster via the Consul Helm Chart and targeting a namespace that is not default, there is the following issue.
The consul-k8s server-acl-init command executed by the server-acl-init-job attempts to get the Kubernetes api-server service kubernetes.default.svc.
This code attempts to obtain the service from the namespace specified to the helm chart. If this namespace value is default, then everything just works. If this namespace value is something like consul, then the code fails.
While running in a Pod, the Kubernetes apiserver is accessible via a Service named kubernetes in the default namespace. Therefore, Pods can use the kubernetes.default.svc hostname to query the API server. Official client libraries do this automatically.
Issue
When installing Consul into a Kubernetes cluster via the Consul Helm Chart and targeting a namespace that is not default, there is the following issue.
The
consul-k8s server-acl-init
command executed by theserver-acl-init-job
attempts to get the Kubernetes api-server servicekubernetes.default.svc
.See https://github.com/hashicorp/consul-k8s/blob/master/subcommand/server-acl-init/command.go#L347
This code attempts to obtain the service from the namespace specified to the helm chart. If this namespace value is default, then everything just works. If this namespace value is something like consul, then the code fails.
Solution
Hardcode the namespace searched by this specific piece of code to
default
, since that is always where the service will be.The text was updated successfully, but these errors were encountered: