{"id":44103152,"url":"https://github.com/conradwt/k8s-gateway-api-using-cilium","last_synced_at":"2026-02-08T14:37:42.044Z","repository":{"id":254794003,"uuid":"847555008","full_name":"conradwt/k8s-gateway-api-using-cilium","owner":"conradwt","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-14T06:19:29.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-14T18:03:12.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conradwt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T05:04:46.000Z","updated_at":"2024-09-14T06:19:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbe3d06f-92b0-4c00-b82d-fd08f3ade2c5","html_url":"https://github.com/conradwt/k8s-gateway-api-using-cilium","commit_stats":null,"previous_names":["conradwt/k8s-gateway-api-using-cilium"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/conradwt/k8s-gateway-api-using-cilium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-cilium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-cilium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-cilium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-cilium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conradwt","download_url":"https://codeload.github.com/conradwt/k8s-gateway-api-using-cilium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-cilium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29233476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-08T14:37:41.535Z","updated_at":"2026-02-08T14:37:42.036Z","avatar_url":"https://github.com/conradwt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8s Gateway API Using Cilium\n\nThe purpose of this example is to provide instructions for running the K8s Gatewey API using Cilium.\n\n## Software Requirements\n\n- Cilium CLI v0.16.17 or newer\n\n- Helm v3.15.2 or newer\n\n- Kubernetes 1.31.0 or newer\n\n- Minikube v1.33.1 or newer\n\n- OrbStack v1.6.2 or newer\n\nNote: This tutorial was updated on macOS 14.6.1. The below steps doesn't work with Docker Desktop v4.31.1\nbecause it doesn't expose Linux VM IP addresses to the host OS (i.e. macOS).\n\n## Tutorial Installation\n\n1.  clone github repository\n\n    ```zsh\n    git clone https://github.com/conradwt/k8s-gateway-api-using-cilium.git\n    ```\n\n2.  change directory\n\n    ```zsh\n    cd k8s-gateway-api-using-cilium\n    ```\n\n3.  create Minikube cluster\n\n    ```zsh\n    minikube start --network-plugin=cni --cni=false --profile=gateway-api-cilium --nodes=3 --kubernetes-version=v1.31.0\n    ```\n\n4.  install Kubernetes Gateway API CRDs\n\n    ```zsh\n    kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/experimental-install.yaml\n    ```\n\n5.  enable Cilium Gateway API Controller\n\n    ```zsh\n    cilium install --version 1.16.1 \\\n      --namespace kube-system \\\n      --set kubeProxyReplacement=true \\\n      --set gatewayAPI.enabled=true \\\n      --set hubble.enabled=true \\\n      --set hubble.ui.enabled=true \\\n      --set hubble.relay.enabled=true\n    ```\n\n6.  wait for Cilium to be up and running\n\n    ```zsh\n    cilium status --wait\n    ```\n\n7.  verify that Cilium Gateway API was enabled and deployed\n\n    ```zsh\n    cilium config view  | grep -w \"enable-gateway-api\"\n    ```\n\n8.  install MetalLB\n\n    ```zsh\n    kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml\n    ```\n\n9.  locate the K8s cluster's subnet\n\n    ```zsh\n    docker network inspect gateway-api-cilium | jq '.[0].IPAM.Config[0][\"Subnet\"]'\n    ```\n\n    The results should look something like the following:\n\n    ```json\n    \"194.1.2.0/24\",\n    ```\n\n    Then one can use an IP address range like the following:\n\n    ```\n    194.1.2.100-194.1.2.110\n    ```\n\n10. create the `01-metallb-address-pool.yaml` file\n\n    ```zsh\n    cp 01-metallb-address-pool.yaml.example 01-metallb-address-pool.yaml\n    ```\n\n11. update the `01-metallb-address-pool.yaml`\n\n    ```yaml\n    apiVersion: metallb.io/v1beta1\n    kind: IPAddressPool\n    metadata:\n      name: demo-pool\n      namespace: metallb-system\n    spec:\n      addresses:\n        - 194.1.2.100-194.1.2.110\n    ```\n\n    Note: The IP range needs to be in the same range as the K8s cluster, `gateway-api-cilium`.\n\n12. apply the address pool manifest\n\n    ```zsh\n    kubectl apply -f 01-metallb-address-pool.yaml\n    ```\n\n13. apply Layer 2 advertisement manifest\n\n    ```zsh\n    kubectl apply -f 02-metallb-advertise.yaml\n    ```\n\n14. deploy the demo app\n\n    ```zsh\n    kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.11/samples/bookinfo/platform/kube/bookinfo.yaml\n    ```\n\n15. deploy the Gateway and HTTPRoute resources\n\n    ```zsh\n    kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/1.16.1/examples/kubernetes/gateway/basic-http.yaml\n    ```\n\n16. output info about the gateway resource\n\n    ```zsh\n    kubectl get gateway my-gateway\n    ```\n\n    The results should look something like the following:\n\n    ```zsh\n    NAME         CLASS    ADDRESS          PROGRAMMED   AGE\n    my-gateway   cilium   192.168.49.100   True         8s\n    ```\n\n17. output info about the service resource\n\n    ```zsh\n    kubectl get svc cilium-gateway-my-gateway\n    ```\n\n    The results should look something like the following:\n\n    ```zsh\n    NAME                        TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)        AGE\n    cilium-gateway-my-gateway   LoadBalancer   10.102.213.185   192.168.49.100   80:32085/TCP   18s\n    ```\n\n18. populate $GATEWAY_IP for future commands:\n\n    ```zsh\n    export GATEWAY_IP=$(kubectl get gateway my-gateway -o jsonpath='{.status.addresses[0].value}')\n    echo $GATEWAY_IP\n    ```\n\n19. test the routing rule\n\n    ```zsh\n    curl --fail -s http://\"${GATEWAY_IP}\"/details/1 | jq\n    ```\n\n    The results should look something like the following:\n\n    ```json\n    {\n      \"id\": 1,\n      \"author\": \"William Shakespeare\",\n      \"year\": 1595,\n      \"type\": \"paperback\",\n      \"pages\": 200,\n      \"publisher\": \"PublisherA\",\n      \"language\": \"English\",\n      \"ISBN-10\": \"1234567890\",\n      \"ISBN-13\": \"123-1234567890\"\n    }\n    ```\n\n    ```zsh\n    curl -v -H 'magic: foo' http://\"${GATEWAY_IP}\"\\?great\\=example\n    ```\n\n    The results should look something like the following:\n\n    ```text\n    *   Trying 192.168.49.100:80...\n    * Connected to 192.168.49.100 (192.168.49.100) port 80\n    \u003e GET /?great=example HTTP/1.1\n    \u003e Host: 192.168.49.100\n    \u003e User-Agent: curl/8.9.1\n    \u003e Accept: */*\n    \u003e magic: foo\n    \u003e\n    * Request completely sent off\n    \u003c HTTP/1.1 200 OK\n    \u003c content-type: text/html; charset=utf-8\n    \u003c content-length: 1683\n    \u003c server: envoy\n    \u003c date: Mon, 26 Aug 2024 04:32:00 GMT\n    \u003c x-envoy-upstream-service-time: 34\n    \u003c\n    \u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n      \u003chead\u003e\n        \u003ctitle\u003eSimple Bookstore App\u003c/title\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n\n    \u003c!-- Latest compiled and minified CSS --\u003e\n    \u003clink rel=\"stylesheet\" href=\"static/bootstrap/css/bootstrap.min.css\"\u003e\n\n    \u003c!-- Optional theme --\u003e\n    \u003clink rel=\"stylesheet\" href=\"static/bootstrap/css/bootstrap-theme.min.css\"\u003e\n\n      \u003c/head\u003e\n      \u003cbody\u003e\n\n\n    \u003cp\u003e\n        \u003ch3\u003eHello! This is a simple bookstore application consisting of three services as shown below\u003c/h3\u003e\n    \u003c/p\u003e\n\n    \u003ctable class=\"table table-condensed table-bordered table-hover\"\u003e\u003ctr\u003e\u003cth\u003ename\u003c/th\u003e\u003ctd\u003ehttp://details:9080\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth\u003eendpoint\u003c/th\u003e\u003ctd\u003edetails\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth\u003echildren\u003c/th\u003e\u003ctd\u003e\u003ctable class=\"table table-condensed table-bordered table-hover\"\u003e\u003ctr\u003e\u003cth\u003ename\u003c/th\u003e\u003cth\u003eendpoint\u003c/th\u003e\u003cth\u003echildren\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003ehttp://details:9080\u003c/td\u003e\u003ctd\u003edetails\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003ehttp://reviews:9080\u003c/td\u003e\u003ctd\u003ereviews\u003c/td\u003e\u003ctd\u003e\u003ctable class=\"table table-condensed table-bordered table-hover\"\u003e\u003ctr\u003e\u003cth\u003ename\u003c/th\u003e\u003cth\u003eendpoint\u003c/th\u003e\u003cth\u003echildren\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003ehttp://ratings:9080\u003c/td\u003e\u003ctd\u003eratings\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n    \u003cp\u003e\n        \u003ch4\u003eClick on one of the links below to auto generate a request to the backend as a real user or a tester\n        \u003c/h4\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"/productpage?u=normal\"\u003eNormal user\u003c/a\u003e\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"/productpage?u=test\"\u003eTest user\u003c/a\u003e\u003c/p\u003e\n\n\n\n    \u003c!-- Latest compiled and minified JavaScript --\u003e\n    \u003cscript src=\"static/jquery.min.js\"\u003e\u003c/script\u003e\n\n    \u003c!-- Latest compiled and minified JavaScript --\u003e\n    \u003cscript src=\"static/bootstrap/js/bootstrap.min.js\"\u003e\u003c/script\u003e\n\n      \u003c/body\u003e\n    \u003c/html\u003e\n    * Connection #0 to host 192.168.49.100 left intact\n    ```\n\n20. teardown the cluster\n\n    ```zsh\n    minikube delete --profile gateway-api-cilium\n    ```\n\n## References\n\n- https://docs.cilium.io/en/latest/network/servicemesh/gateway-api/gateway-api/#what-is-gateway-api\n\n- https://docs.cilium.io/en/latest/network/servicemesh/gateway-api/http\n\n- https://docs.cilium.io/en/latest/network/servicemesh/gateway-api/https\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-cilium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-cilium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-cilium/lists"}