Back to Ingress Nginx

Command line arguments

docs/user-guide/cli-arguments.md

latest11.5 KB
Original Source

Command line arguments

The following command line arguments are accepted by the Ingress controller executable.

They are set in the container spec of the ingress-nginx-controller Deployment manifest

ArgumentDescription
--annotations-prefixPrefix of the Ingress annotations specific to the NGINX controller. (default "nginx.ingress.kubernetes.io")
--apiserver-hostAddress of the Kubernetes API server. Takes the form "protocol://address:port". If not specified, it is assumed the program runs inside a Kubernetes cluster and local discovery is attempted.
--bucket-factorBucket factor for native histograms. Value must be > 1 for enabling native histograms. (default 0)
--certificate-authorityPath to a cert file for the certificate authority. This certificate is used only when the flag --apiserver-host is specified.
--configmapName of the ConfigMap containing custom global configurations for the controller.
--controller-classIngress Class Controller value this Ingress satisfies. The class of an Ingress object is set using the field IngressClassName in Kubernetes clusters version v1.19.0 or higher. The .spec.controller value of the IngressClass referenced in an Ingress Object should be the same value specified here to make this object be watched.
--deep-inspectEnables ingress object security deep inspector. (default true)
--default-backend-serviceService used to serve HTTP requests not matching any known server name (catch-all). Takes the form "namespace/name". The controller configures NGINX to forward requests to the first port of this Service.
--default-server-portPort to use for exposing the default server (catch-all). (default 8181)
--default-ssl-certificateSecret containing a SSL certificate to be used by the default HTTPS server (catch-all). Takes the form "namespace/name".
--enable-annotation-validationIf true, will enable the annotation validation feature. Defaults to true
--disable-catch-allDisable support for catch-all Ingresses. (default false)
--disable-full-testDisable full test of all merged ingresses at the admission stage and tests the template of the ingress being created or updated (full test of all ingresses is enabled by default).
--disable-svc-external-nameDisable support for Services of type ExternalName. (default false)
--disable-sync-eventsDisables the creation of 'Sync' Event resources, but still logs them
--dynamic-configuration-retriesNumber of times to retry failed dynamic configuration before failing to sync an ingress. (default 15)
--election-idElection id to use for Ingress status updates. (default "ingress-controller-leader")
--election-ttlDuration a leader election is valid before it's getting re-elected, e.g. 15s, 10m or 1h. (Default: 30s)
--enable-metricsEnables the collection of NGINX metrics. (Default: false)
--enable-ssl-chain-completionAutocomplete SSL certificate chains with missing intermediate CA certificates. Certificates uploaded to Kubernetes must have the "Authority Information Access" X.509 v3 extension for this to succeed. (default false)
--enable-ssl-passthroughEnable SSL Passthrough. (default false)
--disable-leader-electionDisable Leader Election on Nginx Controller. (default false)
--enable-topology-aware-routingEnable topology aware routing feature, needs service object annotation service.kubernetes.io/topology-mode sets to auto. (default false)
--exclude-socket-metricsSet of socket request metrics to exclude which won't be exported nor being calculated. The possible socket request metrics to exclude are documented in the monitoring guide e.g. 'nginx_ingress_controller_request_duration_seconds,nginx_ingress_controller_response_size'
--health-check-pathURL path of the health check endpoint. Configured inside the NGINX status server. All requests received on the port defined by the healthz-port parameter are forwarded internally to this path. (default "/healthz")
--health-check-timeoutTime limit, in seconds, for a probe to health-check-path to succeed. (default 10)
--healthz-portPort to use for the healthz endpoint. (default 10254)
--healthz-hostAddress to bind the healthz endpoint.
--http-portPort to use for servicing HTTP traffic. (default 80)
--https-portPort to use for servicing HTTPS traffic. (default 443)
--ingress-className of the ingress class this controller satisfies. The class of an Ingress object is set using the field IngressClassName in Kubernetes clusters version v1.18.0 or higher or the annotation "kubernetes.io/ingress.class" (deprecated). If this parameter is not set, or set to the default value of "nginx", it will handle ingresses with either an empty or "nginx" class name.
--ingress-class-by-nameDefine if Ingress Controller should watch for Ingress Class by Name together with Controller Class. (default false).
--internal-logger-addressAddress to be used when binding internal syslogger. (default 127.0.0.1:11514)
--kubeconfigPath to a kubeconfig file containing authorization and API server information.
--length-bucketsSet of buckets which will be used for prometheus histogram metrics such as RequestLength, ResponseLength. (default [10, 20, 30, 40, 50, 60, 70, 80, 90, 100])
--max-bucketsMaximum number of buckets for native histograms. (default 100)
--maxmind-edition-idsMaxmind edition ids to download GeoLite2 Databases. (default "GeoLite2-City,GeoLite2-ASN")
--maxmind-retries-timeoutMaxmind downloading delay between 1st and 2nd attempt, 0s - do not retry to download if something went wrong. (default 0s)
--maxmind-retries-countNumber of attempts to download the GeoIP DB. (default 1)
--maxmind-license-keyMaxmind license key to download GeoLite2 Databases. https://blog.maxmind.com/2019/12/significant-changes-to-accessing-and-using-geolite2-databases/ .
--maxmind-mirrorMaxmind mirror url (example: http://geoip.local/databases.
--metrics-per-hostExport metrics per-host. (default true)
--metrics-per-undefined-hostExport metrics per-host even if the host is not defined in an ingress. Requires --metrics-per-host to be set to true. (default false)
--monitor-max-batch-sizeMax batch size of NGINX metrics. (default 10000)
--post-shutdown-grace-periodAdditional delay in seconds before controller container exits. (default 10)
--profiler-portPort to use for expose the ingress controller Go profiler when it is enabled. (default 10245)
--profilingEnable profiling via web interface host:port/debug/pprof/ . (default true)
--publish-serviceService fronting the Ingress controller. Takes the form "namespace/name". When used together with update-status, the controller mirrors the address of this service's endpoints to the load-balancer status of all Ingress objects it satisfies.
--publish-status-addressCustomized address (or addresses, separated by comma) to set as the load-balancer status of Ingress objects this controller satisfies. Requires the update-status parameter.
--report-node-internal-ip-addressSet the load-balancer status of Ingress objects to internal Node addresses instead of external. Requires the update-status parameter. (default false)
--report-status-classesIf true, report status classes in metrics (2xx, 3xx, 4xx and 5xx) instead of full status codes. (default false)
--ssl-passthrough-proxy-portPort to use internally for SSL Passthrough. (default 442)
--status-portPort to use for the lua HTTP endpoint configuration. (default 10246)
--status-update-intervalTime interval in seconds in which the status should check if an update is required. Default is 60 seconds. (default 60)
--stream-portPort to use for the lua TCP/UDP endpoint configuration. (default 10247)
--sync-periodPeriod at which the controller forces the repopulation of its local object stores. Disabled by default.
--sync-rate-limitDefine the sync frequency upper limit. (default 0.3)
--tcp-services-configmapName of the ConfigMap containing the definition of the TCP services to expose. The key in the map indicates the external port to be used. The value is a reference to a Service in the form "namespace/name:port", where "port" can either be a port number or name. TCP ports 80 and 443 are reserved by the controller for servicing HTTP traffic.
--time-bucketsSet of buckets which will be used for prometheus histogram metrics such as RequestTime, ResponseTime. (default [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10])
--udp-services-configmapName of the ConfigMap containing the definition of the UDP services to expose. The key in the map indicates the external port to be used. The value is a reference to a Service in the form "namespace/name:port", where "port" can either be a port name or number.
--update-statusUpdate the load-balancer status of Ingress objects this controller satisfies. Requires setting the publish-service parameter to a valid Service reference. (default true)
--update-status-on-shutdownUpdate the load-balancer status of Ingress objects when the controller shuts down. Requires the update-status parameter. (default true)
--shutdown-grace-periodSeconds to wait after receiving the shutdown signal, before stopping the nginx process. (default 0)
--size-bucketsSet of buckets which will be used for prometheus histogram metrics such as BytesSent. (default [10, 100, 1000, 10000, 100000, 1e+06, 1e+07])
-v, --v Levelnumber for the log level verbosity
--validating-webhookThe address to start an admission controller on to validate incoming ingresses. Takes the form "<host>:port". If not provided, no admission controller is started.
--validating-webhook-certificateThe path of the validating webhook certificate PEM.
--validating-webhook-keyThe path of the validating webhook key PEM.
--versionShow release information about the Ingress-Nginx Controller and exit.
--watch-ingress-without-classDefine if Ingress Controller should also watch for Ingresses without an IngressClass or the annotation specified. (default false)
--watch-namespaceNamespace the controller watches for updates to Kubernetes objects. This includes Ingresses, Services and all configuration resources. All namespaces are watched if this parameter is left empty.
--watch-namespace-selectorThe controller will watch namespaces whose labels match the given selector. This flag only takes effective when --watch-namespace is empty.