Giter Club home page Giter Club logo

kluster's Introduction

Kluster

A example Kubernetes operator to create Kubernetes cluster on DigitalOcean. Once the operator is running, and we create a Kluster K8S resource in a cluster, a DigitalOcean Kubernetes cluster would be created with provided configuration.

This operator was written as part of one of my YouTube playlist.

Here is an example of the Kluster resource

apiVersion: viveksingh.dev/v1alpha1
kind: Kluster
metadata:
  name: kluster-0
spec:
  name: kluster-0
  region: "nyc1"
  version: "1.21.3-do.0"
  tokenSecret: "default/dosecret" # secret that has DigitalOcean token
  nodePools:
    - count: 3
      name: "dummy-nodepool"
      size: "s-2vcpu-2gb"

Deploy on a Kubernetes cluster

Execute below command, from root of the repo

Create Kluster CRD

kubectl create -f manifests/viveksingh.dev_klusters.yaml

Create RBAC resources and deployment

kubectl create -f manifests/install/

Create a secret with DigitalOcean token

To call DigitalOcean APIs we will have to create a secret with DigitalOcean token that will be used in the Kluster CR that we create.

kubectl create secret generic dosecret --from-literal token=<your-DO-token>

Create a kluster CR

Create the kluster resource to create a k8s cluster in DigitalOcean

kubectl create -f manifests/klusterone.yaml

kluster's People

Contributors

viveksinghggits avatar

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.