Linkerd's control plane does not include ingress or egress gateways. Linkerd allows you choice of your preferred ingress (and egress) controller.
In case you're anticipating infusing Linkerd into your ingress controller's pods there is some setup required. Linkerd discovers
services dependent on the :authority
or Host
header. This permits Linkerd to comprehend what service a request is bound for without
being subject to DNS or IPs.
In this workshop, you will use the NGINX Ingress Controller with Linkerd.
Using Meshery, select the Linkerd from the Management menu, and:
Install ingress controller using Docker Desktop
1kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.40.2/deploy/static/provider/cloud/deploy.yaml
Install the ingress controller using Minikube
1minikube addons enable ingress
Using Meshery, click the ➡️ icon on the Apply Custom Configuration
card and apply the following manifest to your cluster:
1apiVersion: extensions/v1beta12kind: Ingress3metadata:4 name: web-ingress5 namespace: emojivoto6 annotations:7 kubernetes.io/ingress.class: "nginx"8 nginx.ingress.kubernetes.io/configuration-snippet: |9 proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;10 grpc_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;1112spec:13 rules:14 - host: example.com15 http:16 paths:17 - backend:18 serviceName: web-svc19 servicePort: 80
Nginx ingress will include the l5d-dst-override
header to tell Linkerd where to direct the request.
You'll need to include both the Kubernetes administration FQDN (web-svc.emojivoto.svc.cluster.local) and the destination servicePort.
To test this, you need to get the external IP of your controller.
You may use http://localhost or http://kubernetes.docker.internal or your host's IP address.
Expose your Kubernetes's cluster services to your localhost network:
1minikube tunnel
You may use http://localhost or You may use http://localhost: provided by the output of minikube tunnel
.
Retrieve the external IP address by running:
1kubectl get svc --all-namespaces \2 -l app=nginx-ingress,component=controller \3 -o=custom-columns=EXTERNAL-IP:.status.loadBalancer.ingress[0].ip
You can now curl to your service without using port-forward, like this:
1curl -H "Host: example.com" http://{external-ip}