Hello I’m trying to connect my pod to a consul cluster. I am running in minikube. I tried Get Started on Kubernetes | Consul - HashiCorp Learn and it worked fine. But now when Im trying todo basically the same thing with my own stuff my pod wont register with consul, probably because no sidercar proxy is injected into the pod.
Here is my values.yml
My chart has only a single dependency
My deployment and service
After starting this, consul and my edge-pod starts up but I cannot see my edge-pod registered in consul, I only see:
My edge pod should also be there (probably messed something up).
These are all my pods running:
Output from injector pod, if that helps
Would love some pointers
The reason I have commented-out ServiceDefaults
Hi @josvegit ! Thanks for filing this issue!
It’s a little bit hard to read in the screenshots but I’m wondering if you’ve possibly put the connect annotation on your Deployment instead of your Pods?
Can you confirm that you’ve either set
connectInject.default: true or set the annotation on your Pods?
Hi thanks for helping!
I’m setting this in my values.yaml (I made a mistake before and posted my deployment and service twice).
When I describe my pod, it seems to have the correct annotations:
Maybe this image is better:
I’m quite sure its not the deployment annotations, I read that was a common issue.
I’m not even sure I should need the annotations with those configs in my values.yml but perhaps I have misunderstood.
I think I have found the issue not sure what the solution is though. If I edit my deployment (just to force an upgrade) and after that run a helm upgrade, the pod gets registered. So it seems that my pod starts before consul is ready and then there is no sidecar container injected into it ?
I guess I could also have initcontainers that simply waits for consul to become live, not sure if this is the best idea ?
It is, if consul is installed in the cluster I don’t get that error
Yes it’s a similar issue but that one won’t be “fixed”. We’ll always require the CRDs to be installed and the controller running.