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 gateway how-to guide #1021

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

Conversation

nhennigan
Copy link
Contributor

Follow on from issue #986
How-to guide in using the default gateway provided in Canonical K8s

@nhennigan nhennigan requested a review from a team as a code owner January 29, 2025 21:40
@eaudetcobello
Copy link
Contributor

This is bare bones, but considering we don't have any configuration options for gateway, I suppose it's ok for now.

@nhennigan
Copy link
Contributor Author

This is bare bones, but considering we don't have any configuration options for gateway, I suppose it's ok for now.

Yes I agree. I think an explanation page would go well in explaining exactly what the gateway does in our implementation.

Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

LGTM, agreed on an explanation page dedicated to gateway api

Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Great work @nhennigan, I've provided some pointers that should help you expand these docs!

docs/src/snap/howto/networking/default-gateway.md Outdated Show resolved Hide resolved
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Great work, if we can add the following little bit we should be looking perfect!

docs/src/snap/howto/networking/default-gateway.md Outdated Show resolved Hide resolved
docs/src/snap/howto/networking/default-gateway.md Outdated Show resolved Hide resolved
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen 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 Niamh, one more little detail.

docs/src/snap/howto/networking/default-gateway.md Outdated Show resolved Hide resolved
@nhennigan nhennigan force-pushed the KU-2542-gateway branch 2 times, most recently from b40c6b2 to 36e4bee Compare February 5, 2025 23:47
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Awesome, a few little comments then we should be ready.

@louiseschmidtgen
Copy link
Contributor

Should we add a link to this doc in the gateway how-to? It extends it nicely.

@nhennigan
Copy link
Contributor Author

Should we add a link to this doc in the gateway how-to? It extends it nicely.

I am not sure what you are referring to here?

@louiseschmidtgen
Copy link
Contributor

louiseschmidtgen commented Feb 7, 2025

Should we add a link to this doc in the gateway how-to? It extends it nicely.

I am not sure what you are referring to here?

Sorry, I meant link the gateway how-to in the load-balancer how-to. :D

Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Thanks Niamh, one more thing:

This will assign an external IP to `cilium-gateway-my-gateway`.

```
sudo k8s set load-balancer.cidrs=10.0.1.0/28 load-balancer.l2-mode=true
Copy link
Contributor

Choose a reason for hiding this comment

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

For the CIDR we shouldn't assign a range from within the private Kubernetes network.
I would look at your node's CIDR like so:

ip -o -4 route show to default
default via 192.168.101.1 dev wlo1 proto dhcp src 192.168.101.118 metric 600 

ip -o -4 addr show
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
3: wlo1    inet 192.168.101.118/24 brd 192.168.101.255 scope global dynamic noprefixroute wlo1\ 
      valid_lft 577sec preferred_lft 577sec

Using a tiny example CIDR here:
192.168.101.220/28 


Curling the ClusterIP of `cilium-gateway-my-gateway` or `my-nginx`
should return the welcome to Nginx message. This means the Nginx
server is accessible from within the cluster. In this example:
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
server is accessible from within the cluster. In this example:
server is accessible from within the cluster. In this example the IP address is `10.152.183.189:80`:

I would just make sure the user knows that their IP is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants