OS Manuals

/usr/bin/kube2iam

Provide IAM credentials to containers running inside a kubernetes cluster based on annotations (FIPS build)

From kube2iam-fips 0.15.0-r6 (enterprise-packages), captured 2026-11-08 by running kube2iam --help (exit 0). permalink

Usage of /usr/bin/kube2iam:
      --api-server string                     Endpoint for the api server
      --api-token string                      Token to authenticate with the api server
      --app-port string                       Kube2iam server http port (default "8181")
      --auto-discover-base-arn                Queries EC2 Metadata to determine the base ARN
      --auto-discover-default-role            Queries EC2 Metadata to determine the default Iam Role and base ARN, cannot be used with --default-role, overwrites any previous setting for --base-role-arn
      --backoff-max-elapsed-time duration     Max elapsed time for backoff when querying for role. (default 2s)
      --backoff-max-interval duration         Max interval for backoff when querying for role. (default 1s)
      --base-role-arn string                  Base role ARN
      --cache-resync-period duration          Kubernetes caches resync period (default 30m0s)
      --debug                                 Enable debug features
      --default-role string                   Fallback role to use when annotation is not set
      --host-interface string                 Host interface for proxying AWS metadata (default "docker0")
      --host-ip string                        IP address of host
      --iam-external-id string                Pod annotation key used to retrieve the IAM ExternalId (default "iam.amazonaws.com/external-id")
      --iam-role-error-ttl duration           TTL for caching assume role errors
      --iam-role-key string                   Pod annotation key used to retrieve the IAM role (default "iam.amazonaws.com/role")
      --iam-role-session-ttl duration         TTL for the assume role session (default 15m0s)
      --insecure                              Kubernetes server should be accessed without verifying the TLS. Testing only
      --iptables                              Add iptables rule (also requires --host-ip)
      --kubeconfig string                     Path to kubeconfig
      --log-format string                     Log format (text/json) (default "text")
      --log-level string                      Log level (default "info")
      --metadata-addr string                  Address for the ec2 metadata (default "169.254.169.254")
      --metrics-port string                   Metrics server http port (default: same as kube2iam server port) (default "8181")
      --namespace-key string                  Namespace annotation key used to retrieve the IAM roles allowed (value in annotation should be json array) (default "iam.amazonaws.com/allowed-roles")
      --namespace-restriction-format string   Namespace Restriction Format (glob/regexp) (default "glob")
      --namespace-restrictions                Enable namespace restrictions
      --node string                           Name of the node where kube2iam is running
      --resolve-duplicate-cache-ips           Queries the k8s api server to find the source of truth when the pod cache contains multiple pods with the same IP
      --use-regional-sts-endpoint             use the regional sts endpoint if AWS_REGION is set
      --verbose                               Verbose
      --version                               Print the version and exits
Options (32)
OptionDescriptionSource
--api-server stringEndpoint for the api serverhelp
--api-token stringToken to authenticate with the api serverhelp
--app-port stringKube2iam server http port (default "8181")help
--auto-discover-base-arnQueries EC2 Metadata to determine the base ARNhelp
--auto-discover-default-roleQueries EC2 Metadata to determine the default Iam Role and base ARN, cannot be used with --default-role, overwrites any previous setting for --base-role-arnhelp
--backoff-max-elapsed-time durationMax elapsed time for backoff when querying for role.help
--backoff-max-interval durationMax interval for backoff when querying for role.help
--base-role-arn stringBase role ARNhelp
--cache-resync-period durationKubernetes caches resync period (default 30m0s)help
--debugEnable debug featureshelp
--default-role stringFallback role to use when annotation is not sethelp
--host-interface stringHost interface for proxying AWS metadata (default "docker0")help
--host-ip stringIP address of hosthelp
--iam-external-id stringPod annotation key used to retrieve the IAM ExternalId (default "iam.amazonaws.com/external-id")help
--iam-role-error-ttl durationTTL for caching assume role errorshelp
--iam-role-key stringPod annotation key used to retrieve the IAM role (default "iam.amazonaws.com/role")help
--iam-role-session-ttl durationTTL for the assume role session (default 15m0s)help
--insecureKubernetes server should be accessed without verifying the TLS.help
--iptablesAdd iptables rule (also requires --host-ip)help
--kubeconfig stringPath to kubeconfighelp
--log-format stringLog format (text/json) (default "text")help
--log-level stringLog level (default "info")help
--metadata-addr stringAddress for the ec2 metadata (default "169.254.169.254")help
--metrics-port stringMetrics server http port (default: same as kube2iam server port) (default "8181")help
--namespace-key stringNamespace annotation key used to retrieve the IAM roles allowed (value in annotation should be json array) (default "iam.amazonaws.com/allowed-roles")help
--namespace-restriction-format stringNamespace Restriction Format (glob/regexp) (default "glob")help
--namespace-restrictionsEnable namespace restrictionshelp
--node stringName of the node where kube2iam is runninghelp
--resolve-duplicate-cache-ipsQueries the k8s api server to find the source of truth when the pod cache contains multiple pods with the same IPhelp
--use-regional-sts-endpointuse the regional sts endpoint if AWS_REGION is sethelp
--verboseVerbosehelp
--versionPrint the version and exitshelp

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