diff --git a/deploy/README.md b/deploy/README.md index 39b5e04f1..1f522d502 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -112,6 +112,13 @@ This setup requires to choose in which layer (L4 or L7) we want to configure the - [Layer 4](https://en.wikipedia.org/wiki/OSI_model#Layer_4:_Transport_Layer): use TCP as the listener protocol for ports 80 and 443. - [Layer 7](https://en.wikipedia.org/wiki/OSI_model#Layer_7:_Application_Layer): use HTTP as the listener protocol for port 80 and terminate TLS in the ELB +Patch the nginx ingress controller deployment to add the flag `--publish-service` + +```console +kubectl patch deployment -n ingress-nginx nginx-ingress-controller --type='json' \ + --patch="$(curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/patch-deployment.yaml)" +``` + For L4: ```console @@ -147,6 +154,13 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast ### GCE - GKE +Patch the nginx ingress controller deployment to add the flag `--publish-service` + +```console +kubectl patch deployment -n ingress-nginx nginx-ingress-controller --type='json' \ + --patch="$(curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/patch-deployment.yaml)" +``` + ```console curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/gce-gke/service.yaml \ | kubectl apply -f - @@ -168,6 +182,13 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast ### Azure +Patch the nginx ingress controller deployment to add the flag `--publish-service` + +```console +kubectl patch deployment -n ingress-nginx nginx-ingress-controller --type='json' \ + --patch="$(curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/patch-deployment.yaml)" +``` + ```console curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/azure/service.yaml \ | kubectl apply -f - diff --git a/deploy/patch-deployment.yaml b/deploy/patch-deployment.yaml new file mode 100644 index 000000000..71d4827ad --- /dev/null +++ b/deploy/patch-deployment.yaml @@ -0,0 +1 @@ +[{'op': 'replace', 'path': '/spec/template/spec/containers/0/args', 'value':['/nginx-ingress-controller','--default-backend-service=$(POD_NAMESPACE)/default-http-backend','--configmap=$(POD_NAMESPACE)/nginx-configuration','--tcp-services-configmap=$(POD_NAMESPACE)/tcp-services','--udp-services-configmap=$(POD_NAMESPACE)/udp-services','--publish-service=$(POD_NAMESPACE)/ingress-nginx']}] \ No newline at end of file