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

docs: add simple example for network field #550

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

googs1025
Copy link
Member

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: googs1025
Once this PR has been reviewed and has the lgtm label, please assign ahg-g for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 26, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @googs1025. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 26, 2024
@googs1025 googs1025 changed the title add simple example for network field docs: add simple example for network field Apr 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 26, 2024
Copy link

netlify bot commented Apr 26, 2024

Deploy Preview for kubernetes-sigs-jobset ready!

Name Link
🔨 Latest commit 913a140
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-jobset/deploys/66440a21f34aa100087375d7
😎 Deploy Preview https://deploy-preview-550--kubernetes-sigs-jobset.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@googs1025
Copy link
Member Author

googs1025 commented Apr 26, 2024

I'm not sure if we need to add documentation demonstrating how to ping between two pods.
like this

root@VM-0-4-ubuntu:/home/ubuntu# kubectl get pods
NAME                               READY   STATUS      RESTARTS   AGE
failure-policy-workers-0-0-c59sq   0/1     Completed   0          20h
failure-policy-workers-0-1-98htc   0/1     Completed   0          20h
network-jobset-leader-0-0-5dmv7    1/1     Running     0          20m
network-jobset-workers-0-0-g5n2t   1/1     Running     0          20m
network-jobset-workers-0-1-rghv6   1/1     Running     0          20m
paralleljobs-driver-0-0-dw5mh      0/1     Completed   0          20h
paralleljobs-workers-0-0-mfwtk     0/1     Completed   0          20h
paralleljobs-workers-0-1-5g6gp     0/1     Completed   0          20h
paralleljobs-workers-0-2-7n9j5     0/1     Completed   0          20h
paralleljobs-workers-0-3-vp8jc     0/1     Completed   0          20h
success-policy-leader-0-0-8rwff    0/1     Completed   0          45h
success-policy-workers-0-0-c58gl   0/1     Completed   0          45h
success-policy-workers-0-1-dhfq9   0/1     Completed   0          45h
root@VM-0-4-ubuntu:/home/ubuntu# kubectl exec -it network-jobset-leader-0-0-5dmv7 -- sh
/ # cat /etc/hosts
# Kubernetes-managed hosts file.
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
fe00::0	ip6-mcastprefix
fe00::1	ip6-allnodes
fe00::2	ip6-allrouters
10.6.2.23	network-jobset-leader-0-0.network-jobset.default.svc.cluster.local	network-jobset-leader-0-0
/ # ping network-jobset-workers-0-1.network-jobset.default.svc.cluster.local
PING network-jobset-workers-0-1.network-jobset.default.svc.cluster.local (10.6.2.24): 56 data bytes
64 bytes from 10.6.2.24: seq=0 ttl=63 time=0.069 ms
64 bytes from 10.6.2.24: seq=1 ttl=63 time=0.062 ms
64 bytes from 10.6.2.24: seq=2 ttl=63 time=0.066 ms
^C
--- network-jobset-workers-0-1.network-jobset.default.svc.cluster.local ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.062/0.065/0.069 ms

@danielvegamyhre
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 26, 2024
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@danielvegamyhre danielvegamyhre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left one comment

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@danielvegamyhre danielvegamyhre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm unsure if we want this network policy example in it's own folder, rather than in examples/simple. I guess you did this since you wanted to add a README explaining some extra steps the user can take to verify the pod-to-pod communication via pod hostnames is working correctly.

@kannon92 what do you think about this? The readme is a nice touch but I don't want the examples folder to get disorganized. Maybe we can think about each example having a short readme to accompany it like this?

examples/network-policy/README.md Outdated Show resolved Hide resolved
@googs1025
Copy link
Member Author

Hmm I'm unsure if we want this network policy example in it's own folder, rather than in examples/simple. I guess you did this since you wanted to add a README explaining some extra steps the user can take to verify the pod-to-pod communication via pod hostnames is working correctly.

@kannon92 what do you think about this? The readme is a nice touch but I don't want the examples folder to get disorganized. Maybe we can think about each example having a short readme to accompany it like this?

Yes, I separated them because I wanted to have a README.md document to describe .

@googs1025
Copy link
Member Author

@danielvegamyhre @kannon92 After thinking for a while, I've decided to put it back into the examples/simple directory. How about this? I will move the README.md file to the Troubleshooting section here because network connectivity issues are something that users should be aware of. If users are unsure, they can refer to the Troubleshooting section for guidance.

Signed-off-by: googs1025 <googs1025@gmail.com>
@googs1025 googs1025 force-pushed the add_doc_example branch 5 times, most recently from 597d6aa to 854317c Compare May 13, 2024 04:34
Signed-off-by: googs1025 <googs1025@gmail.com>
- bash
- -xc
- |
sleep 3600
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have one of these pods ping another pod using . to show how the subdomain works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Add an example YAML file for the usage of the 'network' field.
3 participants