cdk8s-external-dns
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

NPM version PyPI version Release

Downloads npm PyPI

cdk8s-external-dns

cdk8s external dns constructs for cdk8s

Basic implementation of a external dns construct for cdk8s. Contributions are welcome!

Usage

CDK External Dns

import { App, Chart } from 'cdk8s';
import { Construct } from 'constructs';
import { AwsExternalDns, AwsZoneTypeOptions } from 'cdk8s-external-dns';

// default will deploy to default namespace.
export class MyChart extends Chart {
  constructor(scope: Construct, name: string) {
    super(scope, name);
    new AwsExternalDns(this, 'cdk8sAwsExternalDns', {
      domainFilter: 'exmaple.com',
      awsZoneType: AwsZoneTypeOptions.PUBLIC,
    });
  }
}
const app = new App();
new MyChart(app, 'testcdk8s');
app.synth();

Featrue For Add IAM Policy.

  • For IRSA add IAM Policy.
// CDK APP like eks_cluster.ts
import { AwsExternalDnsPolicyHelper } from 'cdk8s-external-dns';
import * as eks from '@aws-cdk/aws-eks';
    const cluster = new eks.Cluster(this, 'MyK8SCluster', {
      defaultCapacity: 0,
      mastersRole: clusterAdmin,
      version: eks.KubernetesVersion.V1_18,
    });

    const externalDnsServiceAccount = cluster.addServiceAccount('external-dns', {
      name: 'external-dns',
    });

    // will help you add policy to IAM Role .
    AwsExternalDnsPolicyHelper.addPolicy(externalDnsServiceAccount);

Also can see example repo

License

Distributed under the Apache 2.0 license.

Package Sidebar

Install

npm i cdk8s-external-dns

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Unpacked Size

154 kB

Total Files

19

Last publish

Collaborators

  • neilguan