Kubernetes version: 1.10.12
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
Host OS: centos7.4
CNI and version: calico 3.1.1
I deploy es and fluentd in same namespace test , and wirte below config to ensure fluentd can visit es:
Not work, then i use whole dns name, still failed:
Readiness probe failed: Get http://elasticsearch-logging.test.svc.cluster.local:9200/: dial tcp: lookup elasticsearch-logging.test.svc.cluster.local: no such host
I remove liveness part and use curl in fluentd pod, that works:
The host in the probe is probably the host http header to use (don’t have the reference documentation handy now). In other words, it connects to the pod IP but it uses the http “Host:” header you specify (in case it is needed to match a specific vhost).
When you do curl http://somehost you are using DNS to resolve which host it is. That will resolve via DNS, connect to that host and also add an http “Host:” header with value somehost.
So, in the first you connect to the pod IP and set a custom http header.
In the second case, you resolve a domain (can be a kubernetes service or whatever), connect to that IP address and then do an http request (and, by default, it always sets the host header to the domain unless specified otherwise).