helm install -f values-consul.yaml consul hashicorp/consul
k get pods
NAME READY STATUS RESTARTS AGE
consul-consul-connect-injector-webhook-deployment-5796fc9774sf4 1/1 Running 0 10m
consul-consul-server-0 1/1 Running 0 9m28s
consul-consul-server-1 1/1 Running 0 10m
consul-consul-server-2 1/1 Running 0 10m
consul-consul-sync-catalog-7f7fb45954-9sf6w 0/1 CrashLoopBackOff 7 10m
k exec -it consul-consul-server-0 /bin/sh
consul members
Node Address Status Type Build Protocol DC Segment
consul-consul-server-0 172.23.8.147:8301 alive server 1.8.2 2 dc1
consul-consul-server-1 172.23.2.67:8301 alive server 1.8.2 2 dc1
consul-consul-server-2 172.23.11.131:8301 alive server 1.8.2 2 dc1
No Consul agents created on kubenetes nodes. Please help.
Thanks
Hi Lkysow,
Without providing a custom values.yaml, I still not see the consul client agents created as well. helm install consul hashicorp/consul
Thanks for your help.
2>/dev/null | grep -E ‘".+"’
] delay=0s timeout=1s period=10s #success=1 #failure=3
Environment:
ADVERTISE_IP: (v1:status.podIP)
NAMESPACE: (v1:metadata.namespace)
NODE: (v1:spec.nodeName)
HOST_IP: (v1:status.hostIP)
Mounts:
/consul/config from config (rw)
/consul/data from data (rw)
Volumes:
data:
Type: EmptyDir (a temporary directory that shares a pod’s lifetime)
Medium:
SizeLimit:
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: consul-consul-client-config
Optional: false
Events:
Type Reason Age From Message
Warning FailedCreate 25s (x14 over 66s) daemonset-controller Error creating: pods “consul-consul-” is forbidden: unable to validate against any pod security policy: [spec.containers[0].hostPort: Invalid value: 8500: Host port 8500 is not allowed to be used. Allowed ports: spec.containers[0].hostPort: Invalid value: 8502: Host port 8502 is not allowed to be used. Allowed ports: ]
Thanks (pro-tip enclose any pasted output within three backticks (without the leading \)
\```
\```
So this is your issue:
Warning FailedCreate 25s (x14 over 66s) daemonset-controller Error creating: pods “consul-consul-” is forbidden: unable to validate against any pod security policy: [spec.containers[0].hostPort: Invalid value: 8500: Host port 8500 is not allowed to be used. Allowed ports: spec.containers[0].hostPort: Invalid value: 8502: Host port 8502 is not allowed to be used. Allowed ports: ]
It looks like you have pod security policies in your cluster so you’ll need to set