Installing NGiNX Community Ingress Router on K8s Clusters via Helm
MD
R
MarkdownInstallation of NGiNX on K8s (template)
NGiNX Ingress Controller k8s - Layer 7 (L4/L7) Load Balancer (outside traffic)
Route/load balance traffic from external clients to the Deployment.
Deploying the NGINX Ingress Controller with Helm
- Create Deployment and Service via Helm
helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true --set controller.publishService.enabled=true - Check that the service is running (as daemonset)
kubectl get svcnginx-ingress-default-backend ClusterIP 10.47.252.194 <none> 80/TCP nginx-ingress-controller LoadBalancer 10.47.248.164 35.198.179.156 80:30313/TCP,443:30463/TCP - Configure Ingress Resources to use NGINX Ingress Controller Note: Ingress Resource object is a collection of L7 rules for routing inbound traffic to Kubernetes Services. https://github.com/GoogleCloudPlatform/community/blob/master/tutorials/nginx-ingress-gke/ingress-resource.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-resource
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: /hello
backend:
serviceName: hello-app
servicePort: 8080
- Apply resource
kubectl apply -f ingress-resource.yaml - Verify that it has been created
kubectl get ingress - Call it from the outside http://external-ip-of-ingress-controller/hello
Created on 3/2/2020