Skip to content
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

Update dns-pod-service.md #10788

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Update dns-pod-service.md #10788

merged 1 commit into from
Jan 16, 2019

Conversation

frontalnh
Copy link
Contributor

@frontalnh frontalnh commented Oct 31, 2018

Fix pod's DNS address

Fix pod's DNS address
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 31, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 31, 2018
@k8sio-netlify-preview-bot
Copy link
Collaborator

Deploy preview for kubernetes-io-master-staging failed.

Built with commit 8526cc3

https://app.netlify.com/sites/kubernetes-io-master-staging/deploys/5bd90138e39e7c7a34317d83

@k8sio-netlify-preview-bot
Copy link
Collaborator

Deploy preview for kubernetes-io-master-staging failed.

Built with commit 8526cc3

https://app.netlify.com/sites/kubernetes-io-master-staging/deploys/5bd90138c965922e24d3471e

@frontalnh frontalnh closed this Oct 31, 2018
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 31, 2018
@frontalnh frontalnh deleted the patch-1 branch October 31, 2018 01:19
@frontalnh frontalnh restored the patch-1 branch October 31, 2018 01:20
@frontalnh frontalnh reopened this Oct 31, 2018
@Bradamant3
Copy link
Contributor

@kubernetes/sig-network-pr-reviews PTAL and lgtm if OK? thanks!

@k8s-ci-robot k8s-ci-robot added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Nov 15, 2018
@Bradamant3
Copy link
Contributor

/assign

@mdlinville
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mistyhacks

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2018
@tengqm
Copy link
Contributor

tengqm commented Jan 16, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 16, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2ebcf10 into kubernetes:master Jan 16, 2019
bsalamat pushed a commit to bsalamat/kubernetes.github.io that referenced this pull request Jan 29, 2019
@andreykaipov
Copy link

Is this correct? I just tried the included example on GKE v1.11.7 and

busybox-1.default-subdomain.my-namespace.pod.cluster.local

doesn't resolve, but

busybox-1.default-subdomain.my-namespace.svc.cluster.local

does.

@tottoto
Copy link

tottoto commented Feb 20, 2019

Me too. I tried the example on v1.13 deployed by kubeadm.

dummy@kubeadmMaster01:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:31:33Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

The cluster.

dummy@kubeadmMaster01:~$ kubectl get nodes
NAME              STATUS   ROLES    AGE   VERSION
kubeadmmaster01   Ready    master   ZZd   v1.13.3
kubeadmnode01     Ready    <none>   ZZd   v1.13.0
kubeadmnode02     Ready    <none>   ZZd   v1.13.0

The example that I used.

dummy@kubeadmMaster01:~$ cat example.yaml
apiVersion: v1
kind: Service
metadata:
  name: default-subdomain
spec:
  selector:
    name: busybox
  clusterIP: None
  ports:
  - name: foo # Actually, no port is needed.
    port: 1234
    targetPort: 1234
---
apiVersion: v1
kind: Pod
metadata:
  name: busybox1
  labels:
    name: busybox
spec:
  hostname: busybox-1
  subdomain: default-subdomain
  containers:
  - image: busybox
    command:
      - sleep
      - "3600"
    name: busybox
---
apiVersion: v1
kind: Pod
metadata:
  name: busybox2
  labels:
    name: busybox
spec:
  hostname: busybox-2
  subdomain: default-subdomain
  containers:
  - image: busybox
    command:
      - sleep
      - "3600"
    name: busybox

Apply.

dummy@kubeadmMaster01:~$ kubectl apply -f example.yaml
service/default-subdomain created
pod/busybox1 created
pod/busybox2 created

Confirm.

dummy@kubeadmMaster01:~$ kubectl get all
NAME           READY   STATUS    RESTARTS   AGE
pod/busybox1   1/1     Running   0          10s
pod/busybox2   1/1     Running   0          10s

NAME                        TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)    AGE
service/default-subdomain   ClusterIP   None         <none>        1234/TCP   10s
service/kubernetes          ClusterIP   10.96.0.1    <none>        443/TCP    ZZd

Tests.

dummy@kubeadmMaster01:~$ kubectl exec -it busybox2 sh
/ # ping -c 1 busybox-1.default-subdomain.default.pod.cluster.local
ping: bad address 'busybox-1.default-subdomain.default.pod.cluster.local'

/ # ping -c 1 busybox-1.default-subdomain.default.svc.cluster.local
PING busybox-1.default-subdomain.default.svc.cluster.local (10.244.1.87): 56 data bytes
64 bytes from 10.244.1.87: seq=0 ttl=62 time=0.315 ms

--- busybox-1.default-subdomain.default.svc.cluster.local ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.315/0.315/0.315 ms

The cluster IP of busybox1 Pod.

dummy@kubeadmMaster01:~$ kubectl get pods busybox1 -o jsonpath="{.status.podIP}"
10.244.1.87

tengqm added a commit that referenced this pull request Feb 20, 2019
k8s-ci-robot pushed a commit that referenced this pull request Feb 21, 2019
kwiesmueller pushed a commit to kwiesmueller/website that referenced this pull request Feb 28, 2019
krmayankk pushed a commit to krmayankk/kubernetes.github.io that referenced this pull request Mar 11, 2019
yagonobre pushed a commit to yagonobre/website that referenced this pull request Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/network Categorizes an issue or PR as relevant to SIG Network. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants