Skip to content

Conversation

@mweibel
Copy link
Collaborator

@mweibel mweibel commented Dec 4, 2025

This change adds an example using the new gateway-api (backed by cilium), similar to the ingress example.

To get this up and running, first install the Gateway API CRDs:

$ kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/experimental-install.yaml

(cillium does not yet state that they support 1.4.x but it worked anyway for this simple example)

Cilium is used because our test cluster (k8test) already installs cilium. However, the installation by k8test needs to be updated to enable gatewayAPI and use the kube-proxy replacement:

$ cilium upgrade --set kubeProxyReplacement=true --set
gatewayAPI.enabled=true

Do this after you installed the CRDs.

This commit includes a separate changeset to replace short-form container images with their long form (docker.io/ prefix). Starting in Kubernetes 1.34 (when using cri-o), the short form is no longer supported. To ensure maximum compatibility, the referenced image names have been adjusted in our examples.

@mweibel mweibel requested review from alakae and href December 4, 2025 07:24
@mweibel mweibel force-pushed the examples-gateway-api branch from 607310c to f514b6a Compare December 4, 2025 08:10
Copy link
Contributor

@href href left a comment

Choose a reason for hiding this comment

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

I think the change looks good, as far as I can tell (not being all that familiar with K8s gateways). I have one suggestion in the comment.

Thanks also for the change to the fully qualified container URIs. Might be useful to put that into a separate commit as that would document the change in Git (as it stands, it is now only mentioned in the PR on GitHub).

# Deploys two docker.io/nginxdemos/hello:plain-text containers ("blue" and "red")
# and creates ClusterIP services named "blue-svc" and "red-svc" for the
# deployments.
# Additionally:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in addition to these references, we might want to add a paragraph about how this can be enabled on the k8test cluster (with the commands mentioned in the PR description, and a hint about how to connect to the control host with a k8test setup: ssh ubuntu@<ip> -i k8test/cluster/ssh).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added the information on how to setup the example with k8test.

Can you elaborate why you think it might be helpful to add information on how to connect to the control host? k8test provides a kubeconfig which can be used for connecting to the cluster and that's all that's needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant mainly to execute the cilium task. I assume you have to run cilium upgrade --set kubeProxyReplacement=true --set gatewayAPI.enabled=true on the control host, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@href I guess you could run it on the control host but it's fine to run it on your own host machine, given that you set the KUBECONFIG to the right target.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, I do not have cilium installed locally, but the description you added works well enough, thanks.

Starting in Kubernetes 1.34 (when using cri-o), the short form is no
longer supported. To ensure maximum compatibility, the referenced image
names have been adjusted in our examples.
Adds an example using the new gateway-api (backed by cilium),
similar to the ingress example.

Cilium is used because our test cluster (k8test) already installs
cilium.
@mweibel mweibel force-pushed the examples-gateway-api branch from f514b6a to e3b3349 Compare December 8, 2025 08:07
Copy link
Collaborator Author

@mweibel mweibel left a comment

Choose a reason for hiding this comment

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

@href thanks for the review. I split the commit into two and adjusted the messages accordingly.

# Deploys two docker.io/nginxdemos/hello:plain-text containers ("blue" and "red")
# and creates ClusterIP services named "blue-svc" and "red-svc" for the
# deployments.
# Additionally:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added the information on how to setup the example with k8test.

Can you elaborate why you think it might be helpful to add information on how to connect to the control host? k8test provides a kubeconfig which can be used for connecting to the cluster and that's all that's needed.

@mweibel mweibel merged commit 9cb6142 into main Dec 8, 2025
7 of 8 checks passed
@mweibel mweibel deleted the examples-gateway-api branch December 8, 2025 09:00
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.

3 participants