Skip to content

Commit 87e186b

Browse files
committed
added cdk8s hello world
1 parent 0ee6644 commit 87e186b

File tree

16 files changed

+25838
-1
lines changed

16 files changed

+25838
-1
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ exercise-solution/
1717

1818
# code Jenkins demos
1919
app/
20+
21+
# Access Keys
22+
*.pem
23+
*.pub
24+
25+
# CDK8s demos
26+
*/08-ckd8s/00-hello-world-code/

04-cloud/01-eks/00-install-tools/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ En el caso de `kubectl`, en el siguinete enlace podemos encontrar la [guía inst
1212

1313
Para instalar `aws cli`, podemos hacer uso del siguiente [enlace](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).
1414

15-
Por último debemos instalar `eksctl`, en este [enlace](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html), tenemos los pasos necesarios.
15+
Por último debemos instalar `eksctl`, en este [enlace](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html), tenemos los pasos necesarios.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version: 14, 12, 10
4+
ARG VARIANT="14-buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
11+
# [Optional] Uncomment if you want to install an additional version of node using nvm
12+
# ARG EXTRA_NODE_VERSION=10
13+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
14+
15+
# [Optional] Uncomment if you want to install more global node modules
16+
# RUN sudo -u node npm install -g <your-package-list-here>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node
3+
{
4+
"name": "Node.js",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick a Node version: 10, 12, 14
8+
"args": { "VARIANT": "14" }
9+
},
10+
11+
// Set *default* container specific settings.json values on container create.
12+
"settings": {
13+
"terminal.integrated.shell.linux": "/bin/bash"
14+
},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [
18+
"dbaeumer.vscode-eslint"
19+
],
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Use 'postCreateCommand' to run commands after the container is created.
25+
// "postCreateCommand": "yarn install",
26+
27+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
28+
"remoteUser": "node"
29+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.d.ts
2+
*.js
3+
!jest.config.js
4+
node_modules
5+
dist/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Placeholder Empty 1`] = `Array []`;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: typescript
2+
app: node main.js
3+
imports:
4+
- k8s
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
========================================================================================================
2+
3+
Your cdk8s typescript project is ready!
4+
5+
cat help Print this message
6+
7+
Compile:
8+
npm run compile Compile typescript code to javascript (or "yarn watch")
9+
npm run watch Watch for changes and compile typescript in the background
10+
npm run build Compile + synth
11+
12+
Synthesize:
13+
npm run synth Synthesize k8s manifests from charts to dist/ (ready for 'kubectl apply -f')
14+
15+
Deploy:
16+
kubectl apply -f dist/*.k8s.yaml
17+
18+
Upgrades:
19+
npm run import Import/update k8s apis (you should check-in this directory)
20+
npm run upgrade Upgrade cdk8s modules to latest version
21+
npm run upgrade:next Upgrade cdk8s modules to latest "@next" version (last commit)
22+
23+
========================================================================================================

0 commit comments

Comments
 (0)