-
Notifications
You must be signed in to change notification settings - Fork 39k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVC Records of headless service for StatefulSet doesnot work normally #85759
Comments
/sig apps |
add some outptut, only can get below SRV from Kube-dns:
|
CoreDNS uses the endpoint hostname instead of a numerical id. It also has the
|
i am searched the difference between kube-dns and coredns: |
after to deployment the coredns with "endpoint_pod_name" option in coredns configMap, everything is OK now.
then i can get the A record by use name "zhou-0.nginx.default.svc.cluster.local"
thank you, very much |
Thank you so much. |
What happened:
I wish to get the StatefulSet pod instances hostname with IP address mapping within containers, like,
Name: web-0.nginx
Address 1: 10.244.1.6
Name: web-1.nginx
Address 1: 10.244.2.6
It should be SVC Records DNS service for StatefulSet Pods.
but now it can parse nginx with nslookup only, it cannot parse web-0.nginx and web-1.nginx.
Refer to:
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/
https://www.bogotobogo.com/DevOps/Docker/Docker_Kubernetes_StatefulSet.php
What you expected to happen:
Name: web-0.nginx
Address 1: 10.244.1.6
Name: web-1.nginx
Address 1: 10.244.2.6
It should be SVC Records DNS service for StatefulSet Pods.
It should be able to parse web-0.nginx and web-1.nginx.
How to reproduce it (as minimally and precisely as possible):
The steps can follow https://www.bogotobogo.com/DevOps/Docker/Docker_Kubernetes_StatefulSet.php
Anything else we need to know?:
Environment:
kubectl version
):v1.16cat /etc/os-release
):NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Kernel (e.g.
uname -a
):Linux controller-1 4.19.78-1.el7.centos.ncir.1.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Fri Oct 18 23:53:12 EEST 2019 x86_64 x86_64 x8_64 GNU/Linux
Install tools:
Network plugin and version (if this is a network-related bug):
Others:
The text was updated successfully, but these errors were encountered: