IdentityType Enum
Enum representing the different identity types that can be used for a Kubernetes service account.
| Source | aws-eks/lib/service-account.ts |
|---|---|
| Type last changed |
Example
ts
declare const cluster: eks.Cluster;
new eks.ServiceAccount(this, 'ServiceAccount', {
cluster,
name: 'test-sa',
namespace: 'default',
identityType: eks.IdentityType.POD_IDENTITY,
});
python
# cluster: eks.Cluster
eks.ServiceAccount(self, "ServiceAccount",
cluster=cluster,
name="test-sa",
namespace="default",
identity_type=eks.IdentityType.POD_IDENTITY
)
java
Cluster cluster;
ServiceAccount.Builder.create(this, "ServiceAccount")
.cluster(cluster)
.name("test-sa")
.namespace("default")
.identityType(IdentityType.POD_IDENTITY)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;
new ServiceAccount(this, "ServiceAccount", new ServiceAccountProps {
Cluster = cluster,
Name = "test-sa",
Namespace = "default",
IdentityType = IdentityType.POD_IDENTITY
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster
eks.NewServiceAccount(this, jsii.String("ServiceAccount"), &ServiceAccountProps{
Cluster: Cluster,
Name: jsii.String("test-sa"),
Namespace: jsii.String("default"),
IdentityType: eks.IdentityType_POD_IDENTITY,
})
Members
| Member | Description |
|---|---|
IRSA | Use the IAM Roles for Service Accounts (IRSA) identity type. |
POD_IDENTITY | Use the EKS Pod Identities identity type. |
Referenced by
ServiceAccountOptions.identityTypeidentity_typeidentityTypeIdentityTypeIdentityType