Skip to content

[KUBERNETES] install envoy at K3S

fourslickz edited this page May 15, 2026 · 3 revisions

ARCHITECTURE

Internet
   ↓
Envoy Gateway
   ↓
HTTPRoute
   ↓
Service nginx
   ↓
Pod nginx

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11929  100 11929    0     0   171k      0 --:--:-- --:--:-- --:--:--  171k
[WARNING] Could not find git. It is required for plugin installation.
Downloading https://get.helm.sh/helm-v3.21.0-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm

customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/grpcroutes.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
helm install eg oci://docker.io/envoyproxy/gateway-helm \
>   --version v1.4.6 \
>   -n envoy-gateway-system \
>   --create-namespace
Pulled: docker.io/envoyproxy/gateway-helm:v1.4.6
Digest: sha256:398ec3e6decf913d1a78112bfc34f921872a1c91ff234cf94cf390e84cedbcd0
NAME: eg
LAST DEPLOYED: Fri May 15 17:32:35 2026
NAMESPACE: envoy-gateway-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
**************************************************************************
*** PLEASE BE PATIENT: Envoy Gateway may take a few minutes to install ***
**************************************************************************

Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway.

Thank you for installing Envoy Gateway! 🎉

Your release is named: eg. 🎉

Your release is in namespace: envoy-gateway-system. 🎉

To learn more about the release, try:

  $ helm status eg -n envoy-gateway-system
  $ helm get all eg -n envoy-gateway-system

To have a quickstart of Envoy Gateway, please refer to https://gateway.envoyproxy.io/latest/tasks/quickstart.

To get more details, please visit https://gateway.envoyproxy.io and https://github.com/envoyproxy/gateway.

helm list -A

NAME       	NAMESPACE           	REVISION	UPDATED                                	STATUS  	CHART                        	APP VERSION
eg         	envoy-gateway-system	1       	2026-05-15 17:32:35.874412587 +0700 WIB	deployed	gateway-helm-v1.4.6          	v1.4.6
traefik-crd	kube-system         	1       	2026-05-11 03:30:57.869441269 +0000 UTC	deployed	traefik-crd-27.0.201+up27.0.2	v2.11.10

kubectl get pods -n envoy-gateway-system

NAME                            READY   STATUS    RESTARTS   AGE
envoy-gateway-c874c4f7b-2qf4x   1/1     Running   0          4m2s

nano gatewayclass.yaml

apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: envoy
spec:
  controllerName: gateway.envoyproxy.io/gatewayclass-controller

kubectl apply -f gatewayclass.yaml

gatewayclass.gateway.networking.k8s.io/envoy created

nano gateway.yaml

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: main-gateway
spec:
  gatewayClassName: envoy
  listeners:
    - name: http
      protocol: HTTP
      port: 80
      allowedRoutes:
        namespaces:
          from: All

kubectl apply -f gateway.yaml

gateway.gateway.networking.k8s.io/main-gateway created

kubectl get gateway

NAME           CLASS   ADDRESS          PROGRAMMED   AGE
main-gateway   envoy   103.196.155.38   True         97s

kubectl get pods -A

NAMESPACE              NAME                                                       READY   STATUS      RESTARTS   AGE
envoy-gateway-system   envoy-default-main-gateway-0c7e158b-7cc6f89898-bbht9       2/2     Running     0          2m46s
envoy-gateway-system   envoy-gateway-585c654bbc-zgcc8                             1/1     Running     0          14m
kube-system            coredns-559656f558-2vt78                                   1/1     Running     0          4d8h
kube-system            helm-install-traefik-crd-dknd7                             0/1     Completed   0          4d8h
kube-system            local-path-provisioner-7677785564-k8ml9                    1/1     Running     0          4d8h
kube-system            metrics-server-7cbbc464f4-ptmvk                            1/1     Running     0          4d8h
kube-system            svclb-envoy-default-main-gateway-0c7e158b-61ffc339-hdsdj   1/1     Running     0          2m46s

kubectl get svc -A

NAMESPACE              NAME                                  TYPE           CLUSTER-IP      EXTERNAL-IP      PORT(S)                                            AGE
default                kubernetes                            ClusterIP      10.43.0.1       <none>           443/TCP                                            4d8h
envoy-gateway-system   envoy-default-main-gateway-0c7e158b   LoadBalancer   10.43.252.92    103.196.155.38   80:30857/TCP                                       3m48s
envoy-gateway-system   envoy-gateway                         ClusterIP      10.43.95.2      <none>           18000/TCP,18001/TCP,18002/TCP,19001/TCP,9443/TCP   90m
kube-system            kube-dns                              ClusterIP      10.43.0.10      <none>           53/UDP,53/TCP,9153/TCP                             4d8h
kube-system            metrics-server                        ClusterIP      10.43.180.213   <none>           443/TCP                                            4d8h

nano nginx.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx
spec:
  selector:
    app: nginx
  ports:
    - port: 80
      targetPort: 80

kubectl apply -f nginx.yaml

deployment.apps/nginx created
service/nginx created

kubectl get pods

NAME                     READY   STATUS    RESTARTS   AGE
nginx-7c5ddbdf54-qgztw   1/1     Running   0          17s

nano route.yaml

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: nginx-route
spec:
  parentRefs:
    - name: main-gateway
  rules:
    - matches:
	- path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: nginx
          port: 80

kubectl apply -f route.yaml

httproute.gateway.networking.k8s.io/nginx-route created

<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, nginx is successfully installed and working.
Further configuration is required for the web server, reverse proxy,
API gateway, load balancer, content cache, or other features.</p>

<p>For online documentation and support please refer to
<a href="https://nginx.org/">nginx.org</a>.<br/>
To engage with the community please visit
<a href="https://community.nginx.org/">community.nginx.org</a>.<br/>
For enterprise grade support, professional services, additional
security features and capabilities please refer to
<a href="https://f5.com/nginx">f5.com/nginx</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

Clone this wiki locally