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
Applicable for both GKE and local Kubernetes (docker-for-desktop).
Steps (assuming we have K8S cluster and helm running):
Deploy consul-k8s using helm chart consul-helm.zip
. Modifications to the original chart from latest tag are: server replica count set to 1, server pod disruption policy maxUnavailable is set to 1, consul image is set to "consul:1.4.0", imageK8S is set to "hashicorp/consul-k8s:0.2.1".
Deploy simple app using this chart modern-app.zip. Number of replicas is 2.
Workload:
I was expected two services registered in consul but:
I just added a little bit of logging to container_init.go file and deployed webhook to my cluster.
I'm not sure why is it happening so I'm looking into kubernetes code right now. Any help where to look would be highly appreciated. I will definitely come up with a pull request if I find how to fix it. Please let me know if you have any thoughts on it. I would love to contribute to this project if I can!
The text was updated successfully, but these errors were encountered:
Applicable for both GKE and local Kubernetes (docker-for-desktop).
Steps (assuming we have K8S cluster and helm running):
Deploy consul-k8s using helm chart consul-helm.zip
. Modifications to the original chart from latest tag are: server replica count set to 1, server pod disruption policy maxUnavailable is set to 1, consul image is set to "consul:1.4.0", imageK8S is set to "hashicorp/consul-k8s:0.2.1".
Deploy simple app using this chart modern-app.zip. Number of replicas is 2.
Workload:
I was expected two services registered in consul but:
Consul:
Consul agent:
modern-app pods described:
kubectl describe pod modern-app-8d7cbf79-l5xxc
kubectl describe pod modern-app-8d7cbf79-zzdr7
Both services have the same ID = "-modern-app-proxy" which is suspicious. And I believe this is a root cause of this issue.
I looked at the consul-k8s code here -
consul-k8s/connect-inject/container_init.go
Lines 100 to 105 in 90af0ee
and then here
consul-k8s/connect-inject/container_init.go
Lines 25 to 28 in 90af0ee
PodName is pod.Name field of payload which comes in POST request to /mutate endpoint.
I was pretty much sure that this field should contain a generated name for a pod. But it turned out to be empty:
I just added a little bit of logging to container_init.go file and deployed webhook to my cluster.
I'm not sure why is it happening so I'm looking into kubernetes code right now. Any help where to look would be highly appreciated. I will definitely come up with a pull request if I find how to fix it. Please let me know if you have any thoughts on it. I would love to contribute to this project if I can!
The text was updated successfully, but these errors were encountered: