Charts: [stable/nginx-ingress] use non standard HTTP/HTTPS ports

Created on 28 Mar 2019  Â·  8Comments  Â·  Source: helm/charts

I need to deploy nginx-ingress LoadBalancer type to serve traffic on other ports than the default 80/443 standard ports.

Reading the documentation my understanding is that controller.service.targetPorts.http should allow you to do that but I'm not sure if this a bug or something not supported by design.

Is this a request for help?: Maybe


BUG REPORT:

Version of Helm and Kubernetes:

⇒  k version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-03-01T23:34:27Z", GoVersion:"go1.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.8-eks-7c34c0", GitCommit:"7c34c0d2f2d0f11f397d55a46945193a0e22d8f3", GitTreeState:"clean", BuildDate:"2019-03-01T22:49:39Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
⇒  helm version
Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}

Which chart:
stable/nginx-ingress

What happened:
I cannot deploy setting a different port than 80 or 443

What you expected to happen:
being able to deploy nginx-ingress controller to server traffic on other ports

How to reproduce it (as minimally and precisely as possible):

helm install --name my-nginx-ingress --namespace kube-system --version 1.3.1 stable/nginx-ingress --set controller.service.enableHttps=false --set controller.service.targetPorts.http=9043 
⇒  ksys get svc
NAME                                               TYPE           CLUSTER-IP       EXTERNAL-IP                                                                      PORT(S)                      AGE
my-nginx-ingress        LoadBalancer   172.20.88.79     aae0a566751a811e9961f127e14386e2-312119108.us-east-1.elb.amazonaws.com           80:32077/TCP                 5m

Anything else we need to know:

lifecyclstale

Most helpful comment

Hi @Mbd06b , Im also using the microk8s (in ubuntu), where is the file located to change the --http-port and --https-port

Make those edits to the Ingress controller. look for args
find your microk8s ingress controller (assuming ingress has been enabled)
kubectl get all --all-namespaces

And edit the ingress with something like the following.
kubectl edit daemonset.apps/nginx-ingress-microk8s-controller -n ingress

All 8 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

@nicolas-g were you able to resolve this?

@rkouyoumjian nope :(

Instead of setting the target port set the port of the service itself. EG change .Values.controller.service.targetPorts.http to .Values.controller.service.ports.http

I'm currently running microk8s ... I use this in my deployment description.

see the --http-port and --https-port container args..

It will at least allow the pod to run, and proxy to the ingress nginx with non-standard ports.

spec:
revisionHistoryLimit: 10
selector:
matchLabels:
name: nginx-ingress-microk8s
template:
metadata:
creationTimestamp: null
labels:
name: nginx-ingress-microk8s
spec:
containers:
- args:
- /nginx-ingress-controller
- --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf
- --publish-status-address=127.0.0.1
- --http-port=8880
- --https-port=444

Hi @Mbd06b , Im also using the microk8s (in ubuntu), where is the file located to change the --http-port and --https-port

Hi @Mbd06b , Im also using the microk8s (in ubuntu), where is the file located to change the --http-port and --https-port

Make those edits to the Ingress controller. look for args
find your microk8s ingress controller (assuming ingress has been enabled)
kubectl get all --all-namespaces

And edit the ingress with something like the following.
kubectl edit daemonset.apps/nginx-ingress-microk8s-controller -n ingress

Was this page helpful?
0 / 5 - 0 ratings