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

Add a guide for external network use case #573

Merged
merged 2 commits into from
Dec 27, 2021

Conversation

mkimuram
Copy link
Contributor

fixes: #572

@submariner-bot
Copy link

🤖 Created branch: z_pr573/mkimuram/external

@netlify
Copy link

netlify bot commented Aug 11, 2021

✔️ Deploy Preview for elated-bell-2913d9 ready!

🔨 Explore the source changes: 5ccd2c2

🔍 Inspect the deploy log: https://app.netlify.com/sites/elated-bell-2913d9/deploys/61c49fcf2fc45000084cfd4b

😎 Browse the preview: https://deploy-preview-573--elated-bell-2913d9.netlify.app

Copy link
Contributor Author

@mkimuram mkimuram left a comment

Choose a reason for hiding this comment

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

Commenting on what seems to be missing. Beside them, it seems working well.

```bash
export KUBECONFIG=kubeconfig.cluster-a
kubectl -n default run tmp-shell --rm -i --tty --image quay.io/submariner/nettest -- bash
curl 242.0.255.253
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to this issue, access from cluster to non-cluster works only via global ingress IP. It should be able to be accessed via DNS name.

metadata:
name: test-vm
spec:
ports:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does it make sense to make it headless service, by adding clusterIP: None?
Then, it will be headless service without selector.

By doing so, I expect that it can provide a persistent source IP from the endpoint that is pointing to an external host.
Currently, it doesn't seem to work maybe the similar reason to this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened a separate issue submariner-io/submariner#1537 .

subctl join --kubeconfig kubeconfig.cluster-b broker-info.subm --clusterid cluster-b --natt=false
```

#### Deploy dns server on cluster-a for non-cluster hosts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a separate issue to discuss a better way for this, here.

On the other hand, subnets of non-cluster hosts should be distinguished from those of all the clusters to easily specify the external network CIDR.
In above case, cluster-a and cluster-b belongs to 192.168.122.0/25 network and test-vm belongs to 192.168.122.128/25 network.
Therefore, the external network CIDR for this configuration is 192.168.122.128/25.
In test environment for just one host, we will be able to specify external network CIDR, like 192.168.122.142/32, however design of the subnet needs to be considered when more hosts are added.
Copy link
Contributor Author

@mkimuram mkimuram Aug 11, 2021

Choose a reason for hiding this comment

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

For this configuration to be more flexible, it would be better to provide a separate interface for external CIDR, in the future, as @mangelajo has already pointed out here.

Copy link
Member

@sridhargaddam sridhargaddam left a comment

Choose a reason for hiding this comment

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

Thanks @mkimuram for the documentation.

src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved

```bash
subm_gw_ip=192.168.122.26
ip r add 242.0.0.0/8 via ${subm_gw_ip}
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to add a small note saying 242.0.0.0/8 is the default globalCIDR?

src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
src/content/getting-started/quickstart/external/_index.md Outdated Show resolved Hide resolved
@submariner-bot
Copy link

🤖 I had an issue pushing the updated branch: already up-to-date

3 similar comments
@submariner-bot
Copy link

🤖 I had an issue pushing the updated branch: already up-to-date

@submariner-bot
Copy link

🤖 I had an issue pushing the updated branch: already up-to-date

@submariner-bot
Copy link

🤖 I had an issue pushing the updated branch: already up-to-date

@mkimuram mkimuram force-pushed the external branch 3 times, most recently from 56c4141 to 1719e45 Compare August 18, 2021 21:01
@mkimuram
Copy link
Contributor Author

@sridhargaddam

Thank you for your review and suggestions! Fixed as suggested.

```bash
CLUSTER_CIDR=10.42.0.0/24
EXTERNAL_CIDR=192.168.122.128/25
subctl join --kubeconfig kubeconfig.cluster-a broker-info.subm --clusterid cluster-a --natt=false --clustercidr=${CLUSTER_CIDR},${EXTERNAL_CIDR}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
subctl join --kubeconfig kubeconfig.cluster-a broker-info.subm --clusterid cluster-a --natt=false --clustercidr=${CLUSTER_CIDR},${EXTERNAL_CIDR}
subctl join --kubeconfig kubeconfig.cluster-a broker-info.subm --clusterid cluster-a --natt=false --external-network-cidr ${EXTERNAL_CIDR}

Copy link
Contributor

Choose a reason for hiding this comment

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

In the future we could have something like this, but still not implemented

@stale
Copy link

stale bot commented Sep 2, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 2, 2021
@mkimuram
Copy link
Contributor Author

mkimuram commented Sep 2, 2021

Still working.

@stale stale bot removed the wontfix This will not be worked on label Sep 2, 2021
@stale
Copy link

stale bot commented Sep 17, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@submariner-bot
Copy link

🤖 Closed branches: [z_pr573/mkimuram/external]

@nyechiel nyechiel reopened this Nov 2, 2021
@stale stale bot removed the wontfix This will not be worked on label Nov 2, 2021
@submariner-bot
Copy link

🤖 Created branch: z_pr573/mkimuram/external

@stale
Copy link

stale bot commented Nov 16, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 16, 2021
@tpantelis tpantelis removed the wontfix This will not be worked on label Nov 16, 2021
@nerdalert
Copy link
Contributor

Hi @mkimuram, I was wondering if you would be up for chatting about this proposal as there is some interest in a project I am working on to find a bare metal and/or non-kube solution and this PR was referenced. My email is brent.salisbury@redhat.com if you were up to chatting on slack/hangout or whatever would be convenient for you. Thanks!

@stale
Copy link

stale bot commented Dec 4, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 4, 2021
@nyechiel
Copy link
Member

nyechiel commented Dec 5, 2021

bump

@stale stale bot removed the wontfix This will not be worked on label Dec 5, 2021
@nyechiel
Copy link
Member

nyechiel commented Dec 17, 2021

@dfarrell07 can you please review this one for style/grammar? I don't see a reason not to merge it, as the content is accurate AFAIK and we keep point users to this PR instead of a proper doc. Thanks!

@sridhargaddam FYI

@nyechiel nyechiel added the confirmed For issues and PRs which we definitely want (disables the stale bot) label Dec 17, 2021
@dfarrell07
Copy link
Member

@dfarrell07 can you please review this one for style/grammar? I don't see a reason not to merge it, as the content is accurate AFAIK and we keep point users to this PR instead of a proper doc. Thanks!

ACK, sounds good @nyechiel will do. I thought this was waiting on some still-pending implementation PRs.

@dfarrell07
Copy link
Member

I'll send a commit with a bunch of little tweaks if that's okay.

@dfarrell07
Copy link
Member

dfarrell07 commented Dec 23, 2021

I'll send a commit with a bunch of little tweaks if that's okay.

Or maybe it would be easier to merge this as-is and I can send a follow-up PR (3aabdcd) with some refactoring?

We should be sure to squash+merge, not rebase+merge.

Thanks @mkimuram!

Signed-off-by: Masaki Kimura <masaki.kimura@hitachivantara.com>
@mkimuram mkimuram force-pushed the external branch 3 times, most recently from 1f9879b to 5ccd2c2 Compare December 23, 2021 16:11
Various edits to the new quickstart guide for connecting K8s clusters
with non-clusters using Submariner.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Signed-off-by: Masaki Kimura <masaki.kimura@hitachivantara.com>
@mkimuram
Copy link
Contributor Author

@dfarrell07

Thank you for your review and fixes.
I've rebased and squashed my commits and added your commit. PTAL

Copy link
Member

@sridhargaddam sridhargaddam left a comment

Choose a reason for hiding this comment

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

Thank you for your patience on the PR @mkimuram. As discussed on the thread, we can get this in and iterate using further PRs.

@sridhargaddam sridhargaddam merged commit 7ffb413 into submariner-io:devel Dec 27, 2021
@submariner-bot
Copy link

🤖 Closed branches: [z_pr573/mkimuram/external]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed For issues and PRs which we definitely want (disables the stale bot)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a guide for external network use case
8 participants