Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viveksinghggits/kluster
An operator to provision Kubernetes cluster on Digital Ocean.
https://github.com/viveksinghggits/kluster
k8s-operator-example kubernetes operator
Last synced: 13 days ago
JSON representation
An operator to provision Kubernetes cluster on Digital Ocean.
- Host: GitHub
- URL: https://github.com/viveksinghggits/kluster
- Owner: viveksinghggits
- Created: 2021-07-25T09:12:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T22:47:46.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T02:51:40.552Z (20 days ago)
- Topics: k8s-operator-example, kubernetes, operator
- Language: Go
- Homepage:
- Size: 117 KB
- Stars: 27
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.youtube.com/watch?v=89PdRvRUcPU&list=PLh4KH3LtJvRTtFWz1WGlyDa7cKjj2Sns0).
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=
```# Create a kluster CR
Create the kluster resource to create a k8s cluster in DigitalOcean
```
kubectl create -f manifests/klusterone.yaml
```