{"id":44103153,"url":"https://github.com/conradwt/k8s-gateway-api-using-traefik","last_synced_at":"2026-02-08T14:37:41.627Z","repository":{"id":252214109,"uuid":"839767529","full_name":"conradwt/k8s-gateway-api-using-traefik","owner":"conradwt","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-15T07:23:04.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-15T08:53:52.726Z","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-08T09:35:06.000Z","updated_at":"2024-08-15T07:23:03.000Z","dependencies_parsed_at":"2024-08-15T08:45:14.401Z","dependency_job_id":null,"html_url":"https://github.com/conradwt/k8s-gateway-api-using-traefik","commit_stats":null,"previous_names":["conradwt/k8s-gateway-api-using-traefik"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/conradwt/k8s-gateway-api-using-traefik","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-traefik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-traefik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-traefik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-traefik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conradwt","download_url":"https://codeload.github.com/conradwt/k8s-gateway-api-using-traefik/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradwt%2Fk8s-gateway-api-using-traefik/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.540Z","updated_at":"2026-02-08T14:37:41.621Z","avatar_url":"https://github.com/conradwt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8s Gateway API Using Traefik\n\nThe purpose of this example is to provide instructions for running the K8s Gatewey API using Traefik.\n\n## Software Requirements\n\n- Helm v3.15.4 or newer\n\n- Kubernetes 1.31.0 or newer\n\n- Minikube v1.33.1 or newer\n\n- OrbStack v1.6.4 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-traefik.git\n    ```\n\n2.  change directory\n\n    ```zsh\n    cd k8s-gateway-api-using-traefik\n    ```\n\n3.  create Minikube cluster\n\n    ```zsh\n    minikube start -p gateway-api-traefik\n    ```\n\n4.  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\n5.  locate the K8s cluster's subnet\n\n    ```zsh\n    docker network inspect gateway-api-traefik | 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\n6.  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\n7.  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-traefik`.\n\n8.  apply the address pool manifest\n\n    ```zsh\n    kubectl apply -f 01-metallb-address-pool.yaml\n    ```\n\n9.  apply Layer 2 advertisement manifest\n\n    ```zsh\n    kubectl apply -f 02-metallb-advertise.yaml\n    ```\n\n10. apply deployment manifest\n\n    ```zsh\n    kubectl apply -f 03-nginx-deployment.yaml\n    ```\n\n11. apply service manifest\n\n    ```zsh\n    kubectl apply -f 04-nginx-service-loadbalancer.yaml\n    ```\n\n12. check that your service has an IP address\n\n    ```zsh\n    kubectl get svc nginx-service\n    ```\n\n    The results should look something like the following:\n\n    ```text\n    NAME            TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)        AGE\n    nginx-service   LoadBalancer   10.106.207.172   194.1.2.100   80:32000/TCP   17h\n    ```\n\n13. test connectivity to `nginx-service` endpoint via external IP address\n\n    ```zsh\n    curl 194.1.2.100\n    ```\n\n    The results should look something like the following:\n\n    ```text\n    \u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n    \u003chead\u003e\n    \u003ctitle\u003eWelcome to nginx!\u003c/title\u003e\n    \u003cstyle\u003e\n    html { color-scheme: light dark; }\n    body { width: 35em; margin: 0 auto;\n    font-family: Tahoma, Verdana, Arial, sans-serif; }\n    \u003c/style\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n    \u003ch1\u003eWelcome to nginx!\u003c/h1\u003e\n    \u003cp\u003eIf you see this page, the nginx web server is successfully installed and\n    working. Further configuration is required.\u003c/p\u003e\n\n    \u003cp\u003eFor online documentation and support please refer to\n    \u003ca href=\"http://nginx.org/\"\u003enginx.org\u003c/a\u003e.\u003cbr/\u003e\n    Commercial support is available at\n    \u003ca href=\"http://nginx.com/\"\u003enginx.com\u003c/a\u003e.\u003c/p\u003e\n\n    \u003cp\u003e\u003cem\u003eThank you for using nginx.\u003c/em\u003e\u003c/p\u003e\n    \u003c/body\u003e\n    \u003c/html\u003e\n    ```\n\n14. install the 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\n15. install/update Traefik RBAC\n\n    ```zsh\n    kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.1/docs/content/reference/dynamic-configuration/kubernetes-gateway-rbac.yml\n    ```\n\n16. create the Gateway and GatewayClass resources\n\n    ```zsh\n    helm repo add traefik https://traefik.github.io/charts\n    helm repo update\n    kubectl create namespace traefik\n    helm upgrade --install --namespace traefik traefik traefik/traefik -f values.yaml\n    ```\n\n17. populate $PROXY_IP for future commands:\n\n    ```zsh\n    export PROXY_IP=$(kubectl get svc --namespace traefik traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}')\n    echo $PROXY_IP\n    ```\n\n18. verify the proxy IP\n\n    ```zsh\n    curl -i $PROXY_IP\n    ```\n\n    The results should look something like the following:\n\n    ```text\n    HTTP/1.1 404 Not Found\n    Content-Type: application/json; charset=utf-8\n    Connection: keep-alive\n    Content-Length: 48\n    X-Kong-Response-Latency: 0\n    Server: kong/3.0.0\n\n    {\"message\":\"no Route matched with those values\"}\n    ```\n\n19. deploy the X service\n\n    # TODO rewrite for our defined service.\n\n    ```zsh\n    kubectl create namespace whoami\n    kubectl apply -f 06-sample-service.yaml\n    ```\n\n20. create HTTPRoute for our deployed service\n\n    # TODO rewrite for our defined service.\n\n    ```zsh\n    kubectl apply -f 07-sample-httproute.yaml\n    ```\n\n21. test the routing rule\n\n    # TODO rewrite for our defined service.\n\n    ```zsh\n    curl $PROXY_IP\n    ```\n\n    The results should look like this:\n\n    ```text\n    Hostname: whoami-98d7579fb-qq2sj\n    IP: 127.0.0.1\n    IP: ::1\n    IP: 10.244.2.3\n    IP: fe80::1060:7eff:fe82:5954\n    RemoteAddr: 10.244.2.2:39066\n    GET / HTTP/1.1\n    Host: 194.1.2.101\n    User-Agent: curl/8.9.1\n    Accept: */*\n    Accept-Encoding: gzip\n    X-Forwarded-For: 194.1.2.3\n    X-Forwarded-Host: 194.1.2.101\n    X-Forwarded-Port: 80\n    X-Forwarded-Proto: http\n    X-Forwarded-Server: traefik-7c7587b647-vdmgt\n    X-Real-Ip: 194.1.2.3\n    ```\n\n## References\n\n- https://traefik.io/blog/getting-started-with-kubernetes-gateway-api-and-traefik\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-traefik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-traefik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradwt%2Fk8s-gateway-api-using-traefik/lists"}