Skip to content
v2.277.0

AuthenticationMode Enum ​

Represents the authentication mode for an Amazon EKS cluster.

Example ​

ts
import { KubectlV37Layer } from '@aws-cdk/lambda-layer-kubectl-v37';
declare const vpc: ec2.Vpc;

new eks.Cluster(this, 'Cluster', {
  vpc,
  version: eks.KubernetesVersion.V1_37,
  kubectlLayer: new KubectlV37Layer(this, 'KubectlLayer'),
  authenticationMode: eks.AuthenticationMode.API_AND_CONFIG_MAP,
});
python
from aws_cdk.lambda_layer_kubectl_v37 import KubectlV37Layer
# vpc: ec2.Vpc


eks.Cluster(self, "Cluster",
    vpc=vpc,
    version=eks.KubernetesVersion.V1_37,
    kubectl_layer=KubectlV37Layer(self, "KubectlLayer"),
    authentication_mode=eks.AuthenticationMode.API_AND_CONFIG_MAP
)
java
import software.amazon.awscdk.cdk.lambdalayer.kubectl.v37.KubectlV37Layer;
Vpc vpc;


Cluster.Builder.create(this, "Cluster")
        .vpc(vpc)
        .version(KubernetesVersion.V1_37)
        .kubectlLayer(new KubectlV37Layer(this, "KubectlLayer"))
        .authenticationMode(AuthenticationMode.API_AND_CONFIG_MAP)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.LambdaLayer.KubectlV37;
Vpc vpc;


new Cluster(this, "Cluster", new ClusterProps {
    Vpc = vpc,
    Version = KubernetesVersion.V1_37,
    KubectlLayer = new KubectlV37Layer(this, "KubectlLayer"),
    AuthenticationMode = AuthenticationMode.API_AND_CONFIG_MAP
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/cdklabs/awscdk-kubectl-go/kubectlv37"
var vpc Vpc


eks.NewCluster(this, jsii.String("Cluster"), &ClusterProps{
	Vpc: Vpc,
	Version: eks.KubernetesVersion_V1_37(),
	KubectlLayer: kubectlv37.NewKubectlV37Layer(this, jsii.String("KubectlLayer")),
	AuthenticationMode: eks.AuthenticationMode_API_AND_CONFIG_MAP,
})

Members ​

MemberDescription
CONFIG_MAPAuthenticates using a Kubernetes ConfigMap.
API_AND_CONFIG_MAPAuthenticates using both the Kubernetes API server and a ConfigMap.
APIAuthenticates using the Kubernetes API server.

Referenced by ​

  • Cluster.authenticationModeauthentication_modeauthenticationModeAuthenticationModeAuthenticationMode
  • ClusterOptions.authenticationModeauthentication_modeauthenticationModeAuthenticationModeAuthenticationMode
  • ICluster.authenticationModeauthentication_modeauthenticationModeAuthenticationModeAuthenticationMode