Interface IOidcProviderNativeProps
Initialization properties for OidcProviderNative.
Namespace: Amazon.CDK.AWS.EKSv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IOidcProviderNativeProps : IOpenIdConnectProviderProps
Syntax (vb)
Public Interface IOidcProviderNativeProps Inherits IOpenIdConnectProviderProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
// or create a new one using an existing issuer url
string issuerUrl;
using Amazon.CDK.LambdaLayer.KubectlV35;
// you can import an existing provider
var provider = OidcProviderNative.FromOidcProviderArn(this, "Provider", "arn:aws:iam::123456:oidc-provider/oidc.eks.eu-west-1.amazonaws.com/id/AB123456ABC");
var provider2 = new OidcProviderNative(this, "Provider", new OidcProviderNativeProps {
Url = issuerUrl
});
var cluster = Cluster.FromClusterAttributes(this, "MyCluster", new ClusterAttributes {
ClusterName = "Cluster",
OpenIdConnectProvider = provider,
KubectlProviderOptions = new KubectlProviderOptions {
KubectlLayer = new KubectlV35Layer(this, "kubectl")
}
});
var serviceAccount = cluster.AddServiceAccount("MyServiceAccount");
var bucket = new Bucket(this, "Bucket");
bucket.GrantReadWrite(serviceAccount);