I have installed Nginx Ingress Controller
by using this Link
From the above link. i have executed the below commands.
$ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.4.2
$ cd kubernetes-ingress/deployments
$ kubectl apply -f common/ns-and-sa.yaml
$ kubectl apply -f rbac/rbac.yaml
$ kubectl apply -f common/default-server-secret.yaml
$ kubectl apply -f common/nginx-config.yaml
$ kubectl apply -f common/ingress-class.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_virtualservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_virtualserverroutes.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_transportservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_policies.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_globalconfigurations.yaml
$ kubectl apply -f daemon-set/nginx-ingress.yaml
It is runs as a daemon set,
$ kubectl get all -n nginx-ingress -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/nginx-ingress-mfnk8 1/1 Running 0 18h 10.244.2.8 worker-3 <none> <none>
pod/nginx-ingress-n4b79 1/1 Running 0 18h 10.244.1.6 worker-2 <none> <none>
pod/nginx-ingress-ndtkw 1/1 Running 0 18h 10.244.3.5 worker-4 <none> <none>
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR
daemonset.apps/nginx-ingress 3 3 3 3 3 <none> 18h nginx-ingress nginx/nginx-ingress:2.4.2 app=nginx-ingress
$ kubectl logs nginx-ingress-n4b79 -n nginx-ingress
I0111 09:17:11.242514 1 flags.go:199] Starting NGINX Ingress Controller Version=2.4.2 PlusFlag=false
I0111 09:17:11.242568 1 flags.go:200] Commit=4252538e0d02dfd42cd3b35884cd5b50147814b7 Date=2022-11-30T14:54:40Z DirtyState=false Arch=linux/amd64 Go=go1.19.3
I0111 09:17:11.249520 1 main.go:214] Kubernetes version: 1.24.9
I0111 09:17:11.257785 1 main.go:341] Using nginx version: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: using the "epoll" event method
2023/01/11 09:17:11 [notice] 24#24: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023/01/11 09:17:11 [notice] 24#24: OS: Linux 5.4.0-132-generic
2023/01/11 09:17:11 [notice] 24#24: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/01/11 09:17:11 [notice] 24#24: start worker processes
2023/01/11 09:17:11 [notice] 24#24: start worker process 30
2023/01/11 09:17:11 [notice] 24#24: start worker process 31
2023/01/11 09:17:11 [notice] 24#24: start worker process 32
2023/01/11 09:17:11 [notice] 24#24: start worker process 33
2023/01/11 09:17:11 [notice] 24#24: start worker process 34
2023/01/11 09:17:11 [notice] 24#24: start worker process 35
2023/01/11 09:17:11 [notice] 24#24: start worker process 36
2023/01/11 09:17:11 [notice] 24#24: start worker process 37
2023/01/11 09:17:11 [notice] 24#24: start worker process 38
2023/01/11 09:17:11 [notice] 24#24: start worker process 39
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 288
2023/01/12 04:30:33 [notice] 24#24: worker process 288 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 282 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 290 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 304 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 328 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 315 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: signal 29 (SIGIO) received
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 290
When i tried to connect Nginx container using http://{Worker-IP}
, Have tried with all three Worker-IPs. For all three it shows 404 Not Found
on browser.
Nginx container Status
shows Running
& Ready
shows (1/1)
. What could the problem? Also let me know Am i missing any additional installation commands?
$ kubectl get ingress --all-namespaces
NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE
jenkins jenkins-ingress <none> jenkins.company.com 80 19h
$ kubectl get svc --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 46h
jenkins jenkins-svc ClusterIP 10.103.54.142 <none> 80/TCP 46h
kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 46h