Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version:v1.18.6
Cloud being used: (put bare-metal if not on a public cloud) - pure bare-metal
Installation method: kubeadm
Host OS: CentOS 7
CNI and version: Docker version 19.03.12
CRI and version: Calico v3.14
I am relatively new to Kubernetes, i have just deployed HA K8s cluster on-premises. We are using NGINX ingress controller to access Apps outside of cluster and verify that i can access apps via dns name defined in ingress rules.
But due to some project requirements, i need to deploy nginx as load balancer . Issue comes when NGINX Load balancer is in front of INGRESS Controller. When i try to access apps via dns name ( dns name points to the ip of nginx load balancer ) is not routing the traffic to worker nodes.
Following are the entries for worker nodes in nginx config file (nginx load balancer) :
upstream backend {
server 192.168.1.41;
server 192.168.1.42;
}
# This server accepts all traffic to port 80 and passes it to the upstream.
server {
listen 80;
location / {
proxy_pass http://backend;
}
}
Following are details for NGINX ingress controller
[kadmin@k8s-master ~]$ kubectl get all -n nginx-ingress
NAME READY STATUS RESTARTS AGE
pod/nginx-ingress-5kmf8 1/1 Running 1 23h
pod/nginx-ingress-kzp76 1/1 Running 1 23h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx-ingress NodePort 10.108.39.187 <none> 80:32606/TCP,443:31978/TCP 23h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/nginx-ingress 2 2 2 2 2 <none> 23h
[kadmin@k8s-master ~]$
Note : I can’t go for MetalLB as it doesn’t support SSL termination. Apart from this i have noticed one strange issue if i don’t have specify the host parameter in ingress rules then ingress is not working. It only works when i specify host entries in ingress yaml file.
I have refer beneath official documentation to install ingress controller as daemonset.
https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/
Can anybody suggest and give some clues to resolve above said issues ??
If any further details are required, please let me know.
Thanks in advance
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.