Modify Nginx Ingress Config
First, check out you nginx-ingress-controller’s name with:
Bash
kubectl get all --all-namespacesYou should see somthing like this.
Bash
NAMESPACE     NAME                                               DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
ingress       daemonset.apps/nginx-ingress-microk8s-controller   1         1         1       1            1           <none>                   42hNow, use kubectl -n <nginx-ingress-namespace> edit ds <nginx-ingress-name> -o yaml to modify the listening port. For example, according to above outputs, the command should be kubectl -n ingress edit ds nginx-ingress-microk8s-controller -o yaml:
Bash
name: nginx-ingress-microk8s
ports:
- containerPort: 80
  hostPort: 8080
  name: http
  protocol: TCP
- containerPort: 443
  hostPort: 8443
  name: https
  protocol: TCP
Leave a Reply Cancel reply