Vault init container is failing with [ERROR] auth.handler: error authenticating: error="Put \"http://connect: connection refused

I have integrated external vault with kubernetes successfully and able to fetch secrets from external vault. Once I have setup the consul service mesh in the namespace the pod is unable to fetch the secrets. It is failing with 2022-09-03T12:28:09.557Z [ERROR] auth.handler: error authenticating: error=“Put "http://20.25.132.97:8200/v1/auth/kubernetes/login\”: dial tcp 20.25.132.97:8200: connect: connection refused" backoff=4m47.25s. Once I disable the consul mesh in the namespace then it is working but if we enable consul again the behaviour repeats.
Please find below consul vaules yaml for reference
global:
name: consul
metrics:
enabled: false
enableAgentMetrics: false
agentMetricsRetentionTime: “1m”
server:
replicas: 2
ui:
enabled: true
metrics:
enabled: false
provider: “prometheus”
baseURL: http://prometheus-server.default.svc.cluster.local
connectInject:
enabled: true
default: true
transparentProxy:
defaultEnabled: true
namespaceSelector: |
matchLabels:
connect-inject : enabled
controller:
enabled: true
terminatingGateways:
enabled: true
prometheus:
enabled: false
ingressGateways:
enabled: true
gateways:
- name: ingress-gateway
service:
type: LoadBalancer
ports:
- port: 80
- port: 8080

I request you to please suggest any mistake i am having in the config.

Got it resolved. The idea here is that Vault init container is trying to perform connection to internet But the Consul envoy is a side-car. The side-car doesnot come up untill the init-container finishes. Hence it is stuck in a loop. We should disable the vault init container checks for this to work in a consul mesh. This can be done with an annotation.

Thanks