Class KubectlProvider
Implementation of Kubectl Lambda.
Inherited Members
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.AWS.EKS.dll
Syntax (csharp)
public class KubectlProvider : NestedStack, ITaggable, IKubectlProvider, IConstruct, IDependable
Syntax (vb)
Public Class KubectlProvider
Inherits NestedStack
Implements ITaggable, IKubectlProvider, IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
var handlerRole = Role.FromRoleArn(this, "HandlerRole", "arn:aws:iam::123456789012:role/lambda-role");
var kubectlProvider = KubectlProvider.FromKubectlProviderAttributes(this, "KubectlProvider", new KubectlProviderAttributes {
FunctionArn = "arn:aws:lambda:us-east-2:123456789012:function:my-function:1",
KubectlRoleArn = "arn:aws:iam::123456789012:role/kubectl-role",
HandlerRole = handlerRole
});
var cluster = Cluster.FromClusterAttributes(this, "Cluster", new ClusterAttributes {
ClusterName = "cluster",
KubectlProvider = kubectlProvider
});
Synopsis
Constructors
KubectlProvider(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
KubectlProvider(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
KubectlProvider(Construct, String, IKubectlProviderProps) |
Properties
HandlerRole | The IAM execution role of the handler. |
RoleArn | The IAM role to assume in order to perform kubectl operations against this cluster. |
ServiceToken | The custom resource provider's service token. |
Methods
FromKubectlProviderAttributes(Construct, String, IKubectlProviderAttributes) | Import an existing provider. |
GetOrCreate(Construct, ICluster) | Take existing provider or create new based on cluster. |
Constructors
KubectlProvider(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected KubectlProvider(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
KubectlProvider(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected KubectlProvider(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
KubectlProvider(Construct, String, IKubectlProviderProps)
public KubectlProvider(Construct scope, string id, IKubectlProviderProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IKubectlProviderProps
Properties
HandlerRole
The IAM execution role of the handler.
public virtual IRole HandlerRole { get; }
Property Value
RoleArn
The IAM role to assume in order to perform kubectl operations against this cluster.
public virtual string RoleArn { get; }
Property Value
System.String
ServiceToken
The custom resource provider's service token.
public virtual string ServiceToken { get; }
Property Value
System.String
Methods
FromKubectlProviderAttributes(Construct, String, IKubectlProviderAttributes)
Import an existing provider.
public static IKubectlProvider FromKubectlProviderAttributes(Construct scope, string id, IKubectlProviderAttributes attrs)
Parameters
- scope Constructs.Construct
Construct.
- id System.String
an id of resource.
- attrs IKubectlProviderAttributes
attributes for the provider.
Returns
GetOrCreate(Construct, ICluster)
Take existing provider or create new based on cluster.
public static IKubectlProvider GetOrCreate(Construct scope, ICluster cluster)
Parameters
- scope Constructs.Construct
Construct.
- cluster ICluster
k8s cluster.
Returns