sub-rat / kubernetes-operator

Kubernetes CR from CRD using operator based on golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kuberneted Operator

steps followed to create the operator

1. Create boilerplate of project

operator-sdk new presentation-operator --type go --repo github.com/NautiluX/presentation-example-operator

2. Generate api code

operator-sdk add api --kind Presentation --api-version presentation.subratgyawai.com.np/v1alpha1


After changing the spec in presentation_type.go

3. Genereate actual CRD(Custom Resource Defination) and go codes

operator-sdk generate crds operator-sdk generate k8s

4. Deploy CRD

kubectl apply -f deploy/crds/presentation.subratgyawai.com.np_presentations_crd.yaml

5. Create Controller of operator to handle CR

operator-sdk add controller --kind Presentation --api-version presentation.subratgyawali.com.np/v1alpha1

6. Run locally

operator-sdk run --local

About

Kubernetes CR from CRD using operator based on golang


Languages

Language:Go 96.2%Language:Shell 1.9%Language:Dockerfile 1.8%