Skip to content

Can I use cdk8s fromd deno? #1979

Answered by tesharp
unicomp21 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it is possible with deno 1.28. Just import it as npm packages. Something like this, not entirely working since a bit copy / paste..

main.ts:

import * as cdk8s from 'npm:cdk8s';
import { Construct } from 'npm:constructs';

export class MyChart extends cdk8s.Chart {
  constructor(scope: Construct, id: string, props: cdk8s.ChartProps) {
    super(scope, id, props);

    ...
  }
}

cdk8s.yaml:

language: typescript
app: deno run --allow-env --allow-write --allow-read main.ts
imports:
  - k8s

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by unicomp21
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1978 on June 02, 2024 06:16.