0

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

To enable the NGINX Ingress controller, run the following command:

 minikube addons enable ingress

How to enable it without minikube on windows? Kubernetes is enabled through Docker-desktop. So minikube is not installed.

UPDATE

From doc: https://kubernetes.github.io/ingress-nginx/deploy/#installation-guide

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.1/deploy/static/provider/cloud/deploy.yaml

Error:

kubectl describe pod ingress-nginx-controller-78cd9ffdfc-lwrwd -n ingress-nginx

Events:
  Type     Reason       Age                  From               Message
  ----     ------       ----                 ----               -------
  Normal   Scheduled    13m                  default-scheduler  Successfully assigned ingress-nginx/ingress-nginx-controller-78cd9ffdfc-lwrwd to docker-desktop
  Warning  FailedMount  9m (x10 over 13m)    kubelet            MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
  Warning  FailedMount  8m53s (x2 over 11m)  kubelet            Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert kube-api-access-7wb8v]: timed out waiting for the condition
  Normal   Pulling      6m57s                kubelet            Pulling image "registry.k8s.io/ingress-nginx/controller:v1.7.1@sha256:7244b95ea47bddcb8267c1e625fb163fc183ef55448855e3ac52a7b260a60407"
eastwater
  • 4,624
  • 9
  • 49
  • 118
  • Can you try to deploy it through command ``kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.2/deploy/static/provider/cloud/deploy.yaml`` – James S May 22 '23 at 19:46
  • The yaml contains many resources. Is there a simpler one? Just need one deployment for the ingress controller. – eastwater May 23 '23 at 01:06

1 Answers1

1

Based from this documentation, you can either install NGINX Ingress through Helm using the project repository chart, or with kubectl apply using YAML manifest.

To install it using Helm:

helm install --namespace kube-system nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx

If you already have helm, you can use the command:

helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace

To install it using kubectl:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.43.0/deploy/static/provider/cloud/deploy.yaml

Unfortunately, The YAML manifest in the command above was generated with helm template, so you will end up with almost the same resources as if you had used Helm to install the controller.

James S
  • 1,181
  • 1
  • 7
  • From the document: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.1/deploy/static/provider/cloud/deploy.yaml, got errors, updated in the question. – eastwater May 23 '23 at 18:44
  • The guide uses version controller-v1.7.1. where is the version controller-v0.43.0 mentioned in the guide? thanks. – eastwater May 23 '23 at 18:50