acceptable-grass-59340
09/10/2024, 3:16 PMwitty-candle-66007
09/11/2024, 12:55 PMCONFIG_MAP
mode, there is an API
authentication mode AWS provides that is able to be used via the access_entries
property (https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#access_entries_python)
It allows adding auth entries (called AccessEntries) by using AWS APIs instead of the k8s ConfigMap. You can create them with the provider by referencing their ARNs.
TS example:
const cluster = new eks.Cluster("example", {
...
authenticationMode: eks.AuthenticationMode.API,
accessEntries: {
instance1: {
principalArn: roleArn1,
type: eks.AccessEntryType.EC2_LINUX
},
instance2: {
principalArn: roleArn2,
type: eks.AccessEntryType.EC2_LINUX
},
}
});
Added benefit of the API
authentication mode is that the auth entries are composable. With the ConfigMap you had to configure it in a single place, but access entries can be added out of band as well:
const example = new aws.eks.AccessEntry("example", {
clusterName: cluster.name,
principalArn: roleArn1,
type: "EC2_LINUX",
});
acceptable-grass-59340
09/11/2024, 4:34 PM