What is the command to execute command line arguments with NGINX Ingress Controller?

6/20/2019

I feel like I'm missing something pretty basic here, but can't find what I'm looking for.

Referring to the NGINX Ingress Controller documentation regarding command line arguments how exactly would you use these? Are you calling a command on the nginx-ingress-controller pod with these arguments? If so, what is the command name?

Can you provide an example?

-- Chad
kubernetes
kubernetes-ingress
nginx

1 Answer

6/21/2019

Command line arguments are accepted by the Ingress controller executable.This can be set in container spec of the nginx-ingress-controller Deployment manifest.

List of annotation document :

https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md

Command line argument document:

https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md

If you will run the command

kubectl describe deployment/nginx-ingress-controller --namespace

You will find this snip :

Args:
  --default-backend-service=$(POD_NAMESPACE)/default-http-backend
  --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
  --annotations-prefix=nginx.ingress.kubernetes.io

Where these all are command line arguments of nginx as suggested.From here you can also change the --annotations-prefix=nginx.ingress.kubernetes.io from here.

Default annotation in nginx is nginx.ingress.kubernetes.io.

!!! note The annotation prefix can be changed using the --annotations-prefix inside command line argument, but the default is nginx.ingress.kubernetes.io.

-- Harsh Manvar
Source: StackOverflow