Skip to content

KubernetesAuthenticationOptions Class

The Kubernetes auth method: the pod proves who it is with the service-account token Kubernetes projected into it, and Vault answers with a token for the named role.

C#
public sealed class KubernetesAuthenticationOptions

Inheritance System.Object → KubernetesAuthenticationOptions

Properties

KubernetesAuthenticationOptions.Mount Property

Mount path of the Kubernetes auth method (the default mount is kubernetes).

C#
public string Mount { get; set; }

Property Value

System.String

KubernetesAuthenticationOptions.Role Property

Name of the Vault role to log in as. The role binds the service account and namespace to the policies the token receives, so it is the one value that has no default.

C#
public string? Role { get; set; }

Property Value

System.String

KubernetesAuthenticationOptions.ServiceAccountTokenPath Property

Path of the projected service-account token file. The default is where Kubernetes mounts it. The file is read on every login, never cached: the kubelet rotates the token at 80% of its lifetime, and the application is the one responsible for picking the rotation up.

C#
public string ServiceAccountTokenPath { get; set; }

Property Value

System.String