OS Manuals

/usr/bin/kube-oidc-proxy

OIDC to Kubernetes API servers where OIDC authentication is unavailable

From kube-oidc-proxy 1.0.12-r21 (enterprise-packages), captured 2026-11-08 by running kube-oidc-proxy --help (exit 0). permalink

kube-oidc-proxy is a reverse proxy to authenticate users to Kubernetes API servers with Open ID Connect Authentication.

Usage:
  kube-oidc-proxy [flags]

Kube-OIDC-Proxy flags:

      --disable-impersonation                    (Alpha) Disable the impersonation of authenticated requests. All authenticated requests will be forwarded as is.
      --extra-user-header-client-ip              (Alpha) If enabled, proxied requests will include the extra user header 'Impersonate-Extra-Remote-Client-IP: <REMOTE_ADDR>' where <REMOTE_ADDR> will contain the remote address of the source of the request.
      --extra-user-headers stringToStringSlice   (Alpha) A list of key value pairs of extra user headers to pass with proxied requests as part of the impersonated request. A single key can hold multiple values. (default [])
      --flush-interval duration                  Specifies the interval to flush request bodies. If 0ms, no periodic flushing is done. A negative value means to flush immediately after each write. Streaming requests such as 'kubectl exec' will ignore this option and flush immediately. (default 50ms)
  -P, --readiness-probe-port int                 Port to expose readiness probe. (default 8080)
      --token-passthrough                        (Alpha) Requests with Bearer tokens that fail OIDC validation are tried against the API server using the Token Review endpoint. If successful, the request is sent on as is, with no impersonation.
      --token-passthrough-audiences strings      (Alpha) List of the identifiers that the resource server presented with the token identifies as. The resource server will verify that non OIDC tokens are intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver. Only used when --token-passthrough is also enabled.

OIDC flags:

      --oidc-ca-file string                   The OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used
      --oidc-client-id string                 The client ID for the OpenID Connect client.
      --oidc-groups-claim string              If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings.
      --oidc-groups-prefix string             If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies.
      --oidc-issuer-url string                The URL of the OpenID issuer, only HTTPS scheme will be accepted.
      --oidc-required-claim mapStringString   A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. Repeat this flag to specify multiple claims.
      --oidc-signing-algs strings             Comma-separated list of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1. (default [RS256])
      --oidc-username-claim string            The OpenID claim to use as the username. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable (default "sub")
      --oidc-username-prefix string           If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'.

Secure Serving flags:

      --bind-address ip                        The IP address on which to listen for the --secure-port port. The associated interface(s) must be reachable by the rest of the cluster, and by CLI/web clients. If blank or an unspecified address (0.0.0.0 or ::), all interfaces and IP address families will be used. (default 0.0.0.0)
      --cert-dir string                        The directory where the TLS certs are located. If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored. (default "/var/run/kubernetes")
      --disable-http2-serving                  If true, HTTP2 serving will be disabled [default=false]
      --http2-max-streams-per-connection int   The limit that the server gives to clients for the maximum number of streams in an HTTP/2 connection. Zero means to use golang's default.
      --permit-address-sharing                 If true, SO_REUSEADDR will be used when binding the port. This allows binding to wildcard IPs like 0.0.0.0 and specific IPs in parallel, and it avoids waiting for the kernel to release sockets in TIME_WAIT state. [default=false]
      --permit-port-sharing                    If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]
      --secure-port int                        The port on which to serve HTTPS with authentication and authorization. It cannot be switched off with 0. (default 6443)
      --tls-cert-file string                   File containing the default x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If HTTPS serving is enabled, and --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory specified by --cert-dir.
      --tls-cipher-suites strings              Comma-separated list of cipher suites for the server. If omitted, the default Go cipher suites will be used.
                                               Preferred values: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256.
                                               Insecure values: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_RC4_128_SHA.
      --tls-curve-preferences int32Slice       Comma-separated list of numeric Go crypto/tls CurveID values, as the allowed key exchange mechanisms for the server. The supported values depend on the Go version used. See https://pkg.go.dev/crypto/tls#CurveID for values supported for each Go version. The order of the list is ignored, and key exchange mechanisms are chosen by Go from this list using an internal preference order. If omitted, the default Go curves will be used. (default [])
      --tls-min-version string                 Minimum TLS version supported. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
      --tls-private-key-file string            File containing the default x509 private key matching --tls-cert-file.
      --tls-sni-cert-key namedCertKey          A pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments. The domain patterns also allow IP addresses, but IPs should only be used if the apiserver has visibility to the IP address requested by a client. If no domain patterns are provided, the names of the certificate are extracted. Non-wildcard matches trump over wildcard matches, explicit domain patterns trump over extracted names. For multiple key/certificate pairs, use the --tls-sni-cert-key multiple times. Examples: "example.crt,example.key" or "foo.crt,foo.key:*.foo.com,foo.com". (default [])

Audit flags:

      --audit-log-batch-buffer-size int             The size of the buffer to store events before batching and writing. Only used in batch mode. (default 10000)
      --audit-log-batch-max-size int                The maximum size of a batch. Only used in batch mode. (default 1)
      --audit-log-batch-max-wait duration           The amount of time to wait before force writing the batch that hadn't reached the max size. Only used in batch mode.
      --audit-log-batch-throttle-burst int          Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. Only used in batch mode.
      --audit-log-batch-throttle-enable             Whether batching throttling is enabled. Only used in batch mode.
      --audit-log-batch-throttle-qps float32        Maximum average number of batches per second. Only used in batch mode.
      --audit-log-compress                          If set, the rotated log files will be compressed using gzip.
      --audit-log-format string                     Format of saved audits. "legacy" indicates 1-line text format for each event. "json" indicates structured json format. Known formats are legacy,json. (default "json")
      --audit-log-maxage int                        The maximum number of days to retain old audit log files based on the timestamp encoded in their filename. Setting a value of 0 means old audit log files are not removed based on age. (default 366)
      --audit-log-maxbackup int                     The maximum number of old audit log files to retain. Setting a value of 0 will mean there's no restriction on the number of files. (default 100)
      --audit-log-maxsize int                       The maximum size in megabytes of the audit log file before it gets rotated. Setting to 0 disables rotation (not recommended). (default 100)
      --audit-log-mode string                       Strategy for sending audit events. Blocking indicates sending events should block server responses. Batch causes the backend to buffer and write events asynchronously. Known modes are batch,blocking,blocking-strict. (default "blocking")
      --audit-log-path string                       If set, all requests coming to the apiserver will be logged to this file.  '-' means standard out.
      --audit-log-truncate-enabled                  Whether event and batch truncating is enabled.
      --audit-log-truncate-max-batch-size int       Maximum size of the batch sent to the underlying backend. Actual serialized size can be several hundreds of bytes greater. If a batch exceeds this limit, it is split into several batches of smaller size. (default 10485760)
      --audit-log-truncate-max-event-size int       Maximum size of the audit event sent to the underlying backend. If the size of an event is greater than this number, first request and response are removed, and if this doesn't reduce the size enough, event is discarded. (default 102400)
      --audit-log-version string                    API group and version used for serializing audit events written to log. (default "audit.k8s.io/v1")
      --audit-policy-file string                    Path to the file that defines the audit policy configuration.
      --audit-webhook-batch-buffer-size int         The size of the buffer to store events before batching and writing. Only used in batch mode. (default 10000)
      --audit-webhook-batch-max-size int            The maximum size of a batch. Only used in batch mode. (default 400)
      --audit-webhook-batch-max-wait duration       The amount of time to wait before force writing the batch that hadn't reached the max size. Only used in batch mode. (default 30s)
      --audit-webhook-batch-throttle-burst int      Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. Only used in batch mode. (default 15)
      --audit-webhook-batch-throttle-enable         Whether batching throttling is enabled. Only used in batch mode. (default true)
      --audit-webhook-batch-throttle-qps float32    Maximum average number of batches per second. Only used in batch mode. (default 10)
      --audit-webhook-config-file string            Path to a kubeconfig formatted file that defines the audit webhook configuration.
      --audit-webhook-initial-backoff duration      The amount of time to wait before retrying the first failed request. (default 10s)
      --audit-webhook-mode string                   Strategy for sending audit events. Blocking indicates sending events should block server responses. Batch causes the backend to buffer and write events asynchronously. Known modes are batch,blocking,blocking-strict. (default "batch")
      --audit-webhook-truncate-enabled              Whether event and batch truncating is enabled.
      --audit-webhook-truncate-max-batch-size int   Maximum size of the batch sent to the underlying backend. Actual serialized size can be several hundreds of bytes greater. If a batch exceeds this limit, it is split into several batches of smaller size. (default 10485760)
      --audit-webhook-truncate-max-event-size int   Maximum size of the audit event sent to the underlying backend. If the size of an event is greater than this number, first request and response are removed, and if this doesn't reduce the size enough, event is discarded. (default 102400)
      --audit-webhook-version string                API group and version used for serializing audit events written to webhook. (default "audit.k8s.io/v1")

Client flags:

      --as-uid string                  UID to impersonate for the operation.
      --as-user-extra stringArray      User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
      --context string                 The name of the kubeconfig context to use
      --disable-compression            If true, opt-out of response compression for all requests to the server
      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kube-client-burst int          Sets the burst on the app kubernetes client, this will configure throttling on requests sent to the apiserver(If not set, it will use client default ones)
      --kube-client-qps float32        Sets the QPS on the app kubernetes client, this will configure throttling on requests sent to the apiserver (If not set, it will use client default ones)
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.
  -n, --namespace string               If present, the namespace scope for this CLI request
      --request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -s, --server string                  The address and port of the Kubernetes API server
      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use

Misc flags:

  -h, --help                           help for kube-oidc-proxy
      --log-flush-frequency duration   Maximum number of seconds between log flushes (default 5s)
  -v, --v Level                        number for the log level verbosity
      --version                        Print version information and quit
      --vmodule moduleSpec             comma-separated list of pattern=N settings for file-filtered logging (only works for the default text log format)
Options (83)
OptionDescriptionSource
--disable-impersonation(Alpha) Disable the impersonation of authenticated requests.help
--extra-user-header-client-ip(Alpha) If enabled, proxied requests will include the extra user header 'Impersonate-Extra-Remote-Client-IP: <REMOTE_ADDR>' where <REMOTE_ADDR> will contain the remote address of the source of the…help
--extra-user-headers stringToStringSlice(Alpha) A list of key value pairs of extra user headers to pass with proxied requests as part of the impersonated request.help
--flush-interval durationSpecifies the interval to flush request bodies.help
-P, --readiness-probe-port intPort to expose readiness probe.help
--token-passthrough(Alpha) Requests with Bearer tokens that fail OIDC validation are tried against the API server using the Token Review endpoint.help
--token-passthrough-audiences strings(Alpha) List of the identifiers that the resource server presented with the token identifies as.help
--oidc-ca-file stringThe OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be usedhelp
--oidc-client-id stringThe client ID for the OpenID Connect client.help
--oidc-groups-claim stringIf provided, the name of a custom OpenID Connect claim for specifying user groups.help
--oidc-groups-prefix stringIf provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies.help
--oidc-issuer-url stringThe URL of the OpenID issuer, only HTTPS scheme will be accepted.help
--oidc-required-claim mapStringStringA key=value pair that describes a required claim in the ID Token.help
--oidc-signing-algs stringsComma-separated list of allowed JOSE asymmetric signing algorithms.help
--oidc-username-claim stringThe OpenID claim to use as the username.help
--oidc-username-prefix stringIf provided, all usernames will be prefixed with this value.help
--bind-address ipThe IP address on which to listen for the --secure-port port.help
--cert-dir stringThe directory where the TLS certs are located.help
--disable-http2-servingIf true, HTTP2 serving will be disabled [default=false]help
--http2-max-streams-per-connection intThe limit that the server gives to clients for the maximum number of streams in an HTTP/2 connection.help
--permit-address-sharingIf true, SO_REUSEADDR will be used when binding the port.help
--permit-port-sharingIf true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port.help
--secure-port intThe port on which to serve HTTPS with authentication and authorization.help
--tls-cert-file stringFile containing the default x509 Certificate for HTTPS.help
--tls-cipher-suites stringsComma-separated list of cipher suites for the server.help
--tls-curve-preferences int32SliceComma-separated list of numeric Go crypto/tls CurveID values, as the allowed key exchange mechanisms for the server.help
--tls-min-version stringMinimum TLS version supported.help
--tls-private-key-file stringFile containing the default x509 private key matching --tls-cert-file.help
--tls-sni-cert-key namedCertKeyA pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments.help
--audit-log-batch-buffer-size intThe size of the buffer to store events before batching and writing.help
--audit-log-batch-max-size intThe maximum size of a batch.help
--audit-log-batch-max-wait durationThe amount of time to wait before force writing the batch that hadn't reached the max size.help
--audit-log-batch-throttle-burst intMaximum number of requests sent at the same moment if ThrottleQPS was not utilized before.help
--audit-log-batch-throttle-enableWhether batching throttling is enabled.help
--audit-log-batch-throttle-qps float32Maximum average number of batches per second.help
--audit-log-compressIf set, the rotated log files will be compressed using gzip.help
--audit-log-format stringFormat of saved audits.help
--audit-log-maxage intThe maximum number of days to retain old audit log files based on the timestamp encoded in their filename.help
--audit-log-maxbackup intThe maximum number of old audit log files to retain.help
--audit-log-maxsize intThe maximum size in megabytes of the audit log file before it gets rotated.help
--audit-log-mode stringStrategy for sending audit events.help
--audit-log-path stringIf set, all requests coming to the apiserver will be logged to this file.help
--audit-log-truncate-enabledWhether event and batch truncating is enabled.help
--audit-log-truncate-max-batch-size intMaximum size of the batch sent to the underlying backend.help
--audit-log-truncate-max-event-size intMaximum size of the audit event sent to the underlying backend.help
--audit-log-version stringAPI group and version used for serializing audit events written to log.help
--audit-policy-file stringPath to the file that defines the audit policy configuration.help
--audit-webhook-batch-buffer-size intThe size of the buffer to store events before batching and writing.help
--audit-webhook-batch-max-size intThe maximum size of a batch.help
--audit-webhook-batch-max-wait durationThe amount of time to wait before force writing the batch that hadn't reached the max size.help
--audit-webhook-batch-throttle-burst intMaximum number of requests sent at the same moment if ThrottleQPS was not utilized before.help
--audit-webhook-batch-throttle-enableWhether batching throttling is enabled.help
--audit-webhook-batch-throttle-qps float32Maximum average number of batches per second.help
--audit-webhook-config-file stringPath to a kubeconfig formatted file that defines the audit webhook configuration.help
--audit-webhook-initial-backoff durationThe amount of time to wait before retrying the first failed request.help
--audit-webhook-mode stringStrategy for sending audit events.help
--audit-webhook-truncate-enabledWhether event and batch truncating is enabled.help
--audit-webhook-truncate-max-batch-size intMaximum size of the batch sent to the underlying backend.help
--audit-webhook-truncate-max-event-size intMaximum size of the audit event sent to the underlying backend.help
--audit-webhook-version stringAPI group and version used for serializing audit events written to webhook.help
--as-uid stringUID to impersonate for the operation.help
--as-user-extra stringArrayUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.help
--certificate-authority stringPath to a cert file for the certificate authorityhelp
--client-certificate stringPath to a client certificate file for TLShelp
--client-key stringPath to a client key file for TLShelp
--cluster stringThe name of the kubeconfig cluster to usehelp
--context stringThe name of the kubeconfig context to usehelp
--disable-compressionIf true, opt-out of response compression for all requests to the serverhelp
--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity.help
--kube-client-burst intSets the burst on the app kubernetes client, this will configure throttling on requests sent to the apiserver(If not set, it will use client default ones)help
--kube-client-qps float32Sets the QPS on the app kubernetes client, this will configure throttling on requests sent to the apiserver (If not set, it will use client default ones)help
--kubeconfig stringPath to the kubeconfig file to use for CLI requests.help
-n, --namespace stringIf present, the namespace scope for this CLI requesthelp
--request-timeout stringThe length of time to wait before giving up on a single server request.help
-s, --server stringThe address and port of the Kubernetes API serverhelp
--tls-server-name stringServer name to use for server certificate validation.help
--token stringBearer token for authentication to the API serverhelp
--user stringThe name of the kubeconfig user to usehelp
-h, --helphelp for kube-oidc-proxyhelp
--log-flush-frequency durationMaximum number of seconds between log flushes (default 5s)help
-v, --v Levelnumber for the log level verbosityhelp
--versionPrint version information and quithelp
--vmodule moduleSpeccomma-separated list of pattern=N settings for file-filtered logging (only works for the default text log format)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.