This operator watches for Instance CRDs and creates corresponding resources in a Unikraft cluster.
- Kubernetes cluster - A running Kubernetes cluster where the operator will run
- Helm - For installing the UKC operator
- Go - For running locally during development
- kubectl - For managing Kubernetes resources
Follow these steps to run the operator locally in a single cluster:
helm install k8s-operator \
--namespace ukc-operator \
--create-namespace \
--set ukc.metro=<UKC_METRO> \
--set ukc.token=<UKC_TOKEN> \
oci://ghcr.io/unikraft-cloud/helm-charts/k8s-operatormake installThis will install the Workload and Instance CRDs into your cluster.
go run ./cmd/main.go --server-config=config/dev/example-same-cluster.yamlThe operator is now running and will watch for CRD changes in your cluster.
In a new terminal, apply the example Instance resource:
kubectl apply -f examples/instance.yamlThe operator will process the Instance and create corresponding resources in the Unikraft cluster. You can verify it was created by checking:
kubectl get instances.compute.datumapis.com