View Source K8s.Conn.Auth.Exec (k8s v1.1.1)
Cluster authentication for kube configs using an exec
section.
Useful for Kubernetes clusters running on AWS which use IAM authentication (eg. the aws-iam-authenticator
binary).
An applicable kube config may look something like this:
# ...
users:
- name: staging-user
user:
exec:
# API version to use when decoding the ExecCredentials resource. Required.
apiVersion: client.authentication.k8s.io/v1alpha1
# Command to execute. Required.
command: aws-iam-authenticator
# Arguments to pass when executing the plugin. Optional.
args:
- token
- -i
- staging
# Environment variables to set when executing the plugin. Optional.
env:
- name: "FOO"
value: "bar"
Link to this section Summary
Functions
"Generate" a token using the exec
config in kube config.
Link to this section Types
Specs
Link to this section Functions
Specs
generate_token(t()) :: {:ok, binary()} | {:error, Jason.DecodeError.t() | K8s.Conn.Error.t()}
"Generate" a token using the exec
config in kube config.