{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68356","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68356/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68356/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68356/events","html_url":"https://github.com/kubernetes/kubernetes/issues/68356","id":357626229,"node_id":"MDU6SXNzdWUzNTc2MjYyMjk=","number":68356,"title":"Pods in StatefulSets don't have DNS A record if service is NodePort","user":{"login":"lystor","id":7275333,"node_id":"MDQ6VXNlcjcyNzUzMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/7275333?v=4","gravatar_id":"","url":"https://api.github.com/users/lystor","html_url":"https://github.com/lystor","followers_url":"https://api.github.com/users/lystor/followers","following_url":"https://api.github.com/users/lystor/following{/other_user}","gists_url":"https://api.github.com/users/lystor/gists{/gist_id}","starred_url":"https://api.github.com/users/lystor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lystor/subscriptions","organizations_url":"https://api.github.com/users/lystor/orgs","repos_url":"https://api.github.com/users/lystor/repos","events_url":"https://api.github.com/users/lystor/events{/privacy}","received_events_url":"https://api.github.com/users/lystor/received_events","type":"User","site_admin":false},"labels":[{"id":105146071,"node_id":"MDU6TGFiZWwxMDUxNDYwNzE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":617149945,"node_id":"MDU6TGFiZWw2MTcxNDk5NDU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-sig","name":"needs-sig","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-06T12:10:57Z","updated_at":"2018-09-06T12:14:11Z","closed_at":null,"author_association":"NONE","body":"Hello\r\n\r\nPods in StatefulSets don't have DNS A record if ClusterIP service is NodePort.\r\n\r\nKubernetes 1.10.3\r\n```\r\n# cat << EOF > test.yaml\r\napiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  name: nginx\r\n  labels:\r\n    app: nginx\r\nspec:\r\n  ports:\r\n  - port: 80\r\n    protocol: TCP\r\n    targetPort: 80\r\n    nodePort: 8888\r\n    name: http\r\n  selector:\r\n    app: nginx\r\n  type: NodePort\r\n---\r\napiVersion: apps/v1\r\nkind: StatefulSet\r\nmetadata:\r\n  name: web\r\nspec:\r\n  selector:\r\n    matchLabels:\r\n      app: nginx\r\n  serviceName: nginx\r\n  replicas: 3\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: nginx\r\n    spec:\r\n      containers:\r\n      - name: nginx\r\n        image: k8s.gcr.io/nginx-slim:0.8\r\nEOF\r\n```\r\n```\r\n$ kubectl create namespace test\r\n$ kubectl -n test apply -f test.yaml\r\n```\r\n```\r\n$ kubectl run dnsutils --rm -it --image=tutum/dnsutils bash\r\n\r\n# dig web-0.nginx.test.svc.cluster.local\r\n<nxdomain>\r\n\r\n# dig nginx.test.svc.cluster.local\r\nnginx.test.svc.cluster.local. 8 IN      A       10.98.89.75\r\n```\r\n```\r\n$ kubectl -n test describe service nginx\r\nName:                     nginx\r\nNamespace:                test\r\nLabels:                   app=nginx\r\nSelector:                 app=nginx\r\nType:                     NodePort\r\nIP:                       10.98.89.75\r\nLoadBalancer Ingress:     localhost\r\nPort:                     http  80/TCP\r\nTargetPort:               80/TCP\r\nNodePort:                 http  8888/TCP\r\nEndpoints:                10.1.0.156:80,10.1.0.158:80,10.1.0.159:80\r\nSession Affinity:         None\r\nExternal Traffic Policy:  Cluster\r\n```\r\n\r\nPlease fix the bug.\r\nThank you\r\n\r\n/kind bug\r\n/sig bugs\r\n@kubernetes/sig-bugs"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/419071399","html_url":"https://github.com/kubernetes/kubernetes/issues/68356#issuecomment-419071399","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68356","id":419071399,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTA3MTM5OQ==","user":{"login":"lystor","id":7275333,"node_id":"MDQ6VXNlcjcyNzUzMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/7275333?v=4","gravatar_id":"","url":"https://api.github.com/users/lystor","html_url":"https://github.com/lystor","followers_url":"https://api.github.com/users/lystor/followers","following_url":"https://api.github.com/users/lystor/following{/other_user}","gists_url":"https://api.github.com/users/lystor/gists{/gist_id}","starred_url":"https://api.github.com/users/lystor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lystor/subscriptions","organizations_url":"https://api.github.com/users/lystor/orgs","repos_url":"https://api.github.com/users/lystor/repos","events_url":"https://api.github.com/users/lystor/events{/privacy}","received_events_url":"https://api.github.com/users/lystor/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T12:14:11Z","updated_at":"2018-09-06T12:14:11Z","author_association":"NONE","body":"/sig bugs\r\n\r\n@kubernetes/sig-bugs"}}
{"actor":{"display_login":"lystor"}}