Code Monkey home page Code Monkey logo

k3d-cdk8s-demo's Introduction

Hello cdk8s (in Python!)

cdk8s-k3d

This example application deploys hello-kubernetes using cdk8s.

You can apply this example into your own k8s cluster with these step by step commands:

Import

$ pipenv install
$ cdk8s import --language python

Synthesize the CDK into a k8s template

$ cdk8s synth

Apply the k8s template to your cluster

$ kubectl apply -f dist/hello.k8s.yaml

Demo

After apply step, hello-svc can be reached at localhost:8080:

$ make status
NAME                             TYPE           CLUSTER-IP    EXTERNAL-IP                   PORT(S)        AGE     SELECTOR
service/kubernetes               ClusterIP      10.43.0.1     <none>                        443/TCP        2m40s   <none>
service/hello-service-c8685ad9   LoadBalancer   10.43.174.4   192.168.240.2,192.168.240.3   80:32694/TCP   2m8s    app=hello

NAME                                             READY   STATUS    RESTARTS   AGE    IP          NODE                       NOMINATED NODE   READINESS GATES
pod/svclb-hello-service-c8685ad9-mvrxw           1/1     Running   0          2m8s   10.42.1.4   k3d-k3s-default-agent-0    <none>           <none>
pod/svclb-hello-service-c8685ad9-kg2pk           1/1     Running   0          2m8s   10.42.0.5   k3d-k3s-default-server-0   <none>           <none>
pod/hello-deployment-c8aab50d-586bd8cf75-rs827   1/1     Running   0          2m8s   10.42.0.3   k3d-k3s-default-server-0   <none>           <none>
pod/hello-deployment-c8aab50d-586bd8cf75-6d967   1/1     Running   0          2m8s   10.42.0.4   k3d-k3s-default-server-0   <none>           <none>

For more details see: gh-ction demo, Source gh-action, K3d config

Credits

https://github.com/cdk8s-team/cdk8s/tree/master/examples/python/web-service

k3d-cdk8s-demo's People

Contributors

atrakic avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Forkers

yemo-memeda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.