Skip to content

An operator to provision Kubernetes cluster on Digital Ocean.

Notifications You must be signed in to change notification settings

viveksinghggits/kluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An operator to provision Kubernetes cluster on Digital Ocean.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published