@Generated(value="jsii-pacmak/1.43.0 (build b69a797)", date="2021-11-09T00:21:33.868Z") @Stability(value=Stable) public class ServiceAccount extends Resource implements IServiceAccount
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceAccount.Builder
A fluent builder for
ServiceAccount. |
software.amazon.jsii.JsiiObject.InitializationModeIServiceAccount.Jsii$Default, IServiceAccount.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
ServiceAccount(software.constructs.Construct scope,
String id) |
|
ServiceAccount(software.constructs.Construct scope,
String id,
ServiceAccountProps props) |
protected |
ServiceAccount(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ServiceAccount(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSecret(ISecret secret)
Allow a secret to be accessed by pods using this service account.
|
static IServiceAccount |
fromServiceAccountName(String name)
Imports a service account from the cluster as a reference.
|
protected org.cdk8s.ApiObject |
getApiObject()
The underlying cdk8s API object.
|
List<ISecret> |
getSecrets()
List of secrets allowed to be used by pods running using this service account.
|
getMetadata, getNameonPrepare, onSynthesize, onValidate, toStringjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ServiceAccount(software.amazon.jsii.JsiiObjectRef objRef)
protected ServiceAccount(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public ServiceAccount(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
ServiceAccountProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public ServiceAccount(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IServiceAccount fromServiceAccountName(@NotNull String name)
name - The name of the service account resource. This parameter is required.@Stability(value=Stable)
public void addSecret(@NotNull
ISecret secret)
secret - The secret. This parameter is required.@Stability(value=Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
getApiObject in class Resourcebase.Resource.apiObjectCopyright © 2021. All rights reserved.