skip to Main Content

I’m following this Link to install nginx-ingress-controller on my bare metal server Kubernetes-v.1.19.16

The below commands i have executed as part of installation.

$ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.4.0
$ cd kubernetes-ingress/deployments

$ kubectl apply -f common/ns-and-sa.yaml
$ kubectl apply -f rbac/rbac.yaml
$ kubectl apply -f rbac/ap-rbac.yaml
$ kubectl apply -f rbac/apdos-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 daemon-set/nginx-ingress.yaml

I have followed DaemonSet method.

$ kubectl get all -n nginx-ingress
NAME                      READY   STATUS    RESTARTS   AGE
pod/nginx-ingress-bcrk5   0/1     Running   0          19m
pod/nginx-ingress-ndpfz   0/1     Running   0          19m
pod/nginx-ingress-nvp98   0/1     Running   0          19m

NAME                           DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/nginx-ingress   3         3         0       3            0           <none>          19m

For all three nginx-ingress pods same error it shown.

$ kubectl describe pods nginx-ingress-bcrk5 -n nginx-ingress
Events:
  Type     Reason     Age                     From               Message
  ----     ------     ----                    ----               -------
  Normal   Scheduled  38m                     default-scheduler  Successfully assigned nginx-ingress/nginx-ingress-bcrk5 to node-4
  Normal   Pulling    38m                     kubelet            Pulling image "nginx/nginx-ingress:2.4.0"
  Normal   Pulled     37m                     kubelet            Successfully pulled image "nginx/nginx-ingress:2.4.0" in 19.603066401s
  Normal   Created    37m                     kubelet            Created container nginx-ingress
  Normal   Started    37m                     kubelet            Started container nginx-ingress
  Warning  Unhealthy  3m13s (x2081 over 37m)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 503
$ kubectl logs -l app=nginx-ingress -n nginx-ingress

E1007 03:18:37.278678       1 reflector.go:140] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:169: Failed to watch *v1.VirtualServer: failed to list *v1.VirtualServer: the server could not find the requested resource (get virtualservers.k8s.nginx.org)
W1007 03:18:55.714313       1 reflector.go:424] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:169: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E1007 03:18:55.714361       1 reflector.go:140] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:169: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
W1007 03:19:00.542294       1 reflector.go:424] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:169: failed to list *v1alpha1.TransportServer: the server could not find the requested resource (get transportservers.k8s.nginx.org)
E1007 03:19:00.542340       1 reflector.go:140] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:169: Failed to watch *v1alpha1.TransportServer: failed to list *v1alpha1.TransportServer: the server could not find the requested resource (get transportservers.k8s.nginx.org)

Still READY and UP-TO-DATE state showing 0, Ideally it show 3 in both the categories. Please let me know what i’m missing here as part of installation?

Any help is appreciated.

3

Answers


  1. Chosen as BEST ANSWER

    With the below branch i could able to see all nginx-ingress pods are in running.

    git clone https://github.com/nginxinc/kubernetes-ingress/
    cd kubernetes-ingress/deployments
    git checkout v1.10.0
    

  2. Can you share the nginx logs using below command?

    kubectl -n nginx-ingress logs -l app=nginx-ingress
    

    I can’t guess anything..

    Login or Signup to reply.
  3. I’d recommend installing it using helm

    See https://github.com/nginxinc/kubernetes-ingress/tree/main/deployments/helm-chart

    helm repo add nginx-stable https://helm.nginx.com/stable
    
    helm install nginx-ingress nginx-stable/nginx-ingress 
        --namespace $NAMESPACE 
        --version $VERSION
    

    You can look for versions compatibles with your Kubernetes cluster version using:

    helm search repo nginx-stable/nginx-ingress --versions
    

    When installation is well finished, you should see ingress-controller service that holds an $EXTERNAL-IP

    NAME                                 TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                                  AGE
    
    ingress-nginx-controller             LoadBalancer   10.0.XXX.XXX   XX.XXX.XXX.XX   80:30578/TCP,443:31874/TCP               548d
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search