Install and configure Traefik Proxy to use as Gateway API of Kubernetes
We will be setting localhost.directFQDN to point to your localhost(127.0.0.1) along with its wildcard certs.
kubectlcreatesecrettlswildcard-localhost-direct-tls--certapps/traefik/certs/localhost.direct.crt--keyapps/traefik/certs/localhost.direct.key-ntraefik# DANGER: following command is used to revert above changers ONLY if neededkubectldeletesecretwildcard-localhost-direct-tls-ntraefik
Deploy Gateway API CRD's (One time Task)
# install CRDs if already not installed.# kubectl get crd gateways.gateway.networking.k8s.io &> /dev/null || \# { kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.0.0" | kubectl apply -f -; }kubectlgetcrdgateways.gateway.networking.k8s.io&> /dev/null || \ { kubectlkustomize"github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.4.0"|kubectlapply-f-; }# customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io created# customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io created# customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io created# customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io created# DANGER: Remove the Gateway API CRDs if they are no longer needed:kubectlkustomize"github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.4.0"|kubectldelete-f-
Deploying Traefik Proxy v3.0
Gateway API is not installed on Kubernetes clusters by default.
helmrepoaddtraefikhttps://traefik.github.io/chartshelmrepoupdate# This will install and start traefik in your local clusterhelminstalltraefik \traefik/traefik \--namespace traefik \--set image.tag=v3.0 \--set ingressRoute.dashboard.entryPoints="{web,websecure}" \--set experimental.kubernetesGateway.enabled=true \--set tlsStore.default.defaultCertificate.secretName="wildcard-localhost-direct-tls" \--wait# DANGER: in case of you want to rollback above installationhelmuninstalltraefik--namespacetraefik