Search code examples
kuberneteskubernetes-ingresskubectlnginx-ingress

Kubernetes - NginxIngressController resources not creating


We are using Nginx ingress operator version 0.2.0 and the controller version 1.11.1. Following steps are completed to deploy the CRD and operator. https://github.com/nginxinc/nginx-ingress-operator/blob/release-0.2.0/docs/manual-installation.md

After that, we are deploying the controller using the following yaml:

apiVersion: k8s.nginx.org/v1alpha1
kind: NginxIngressController
metadata:
  name: nginx-ingress-controller
  namespace: ingress-nginx
spec:
  type: deployment
  image:
    repository: nginx/nginx-ingress
    tag: 1.11.1
    pullPolicy: Always
  serviceType: NodePort
  nginxPlus: False

The manifest gets applied successfully but none of the required resources are getting created (deployment and service). Hence, the ingress is not getting the address.

kubectl get all -n ingress-nginx
No resources found in ingress-nginx namespace.
kubectl get ing
NAME              CLASS    HOSTS   ADDRESS   PORTS   AGE
my-ingress        <none>   *                 80      6h23m

kubeadm, kubelet & kubectl version 1.21.2.

Earlier we had deployed it on minikube and it was working fine.


Solution

  • I have reproduced the use case using Nginx ingress operator version 0.4.0 and the controller version 2.0.x by following the documentation and successfully created the Nginx Ingress Operator and NginxIngressController. Firstly, I didn't create the namespace ingress-nginx,While running the command kubectl get all -n ingress-nginx. I was getting the error No resources found in ingress-nginx namespace.

    enter image description here

    After creating the required namespace by running the command kubectl create namespace ingress-nginx , I am able to get the resources(pod,service,deployment,replica set) successfully.

    enter image description here

    enter image description here

    Can you try again by changing the nginx controller and operator versions to the latest one and also check the configurations correctly.