The following steps can be used to install the operator using the Operator Lifecycle Manager on any Kubernetes environment.
This guide uses minikube to deploy a Kubernetes cluster locally, follow the instructions for your platform to install. If you already have a Kubernetes cluster ready to go, skip to the OLM section.
Run minikube with a dedicated profile. Adjust the system resources as needed for your platform.
minikube start -p daprInstall the OLM components manually. If you already have OLM installed, skip to the Operator section.
Either
- install OLM from here: https://github.com/operator-framework/operator-lifecycle-manager/releases
or
- install using the
operator-sdkcommand
operator-sdk olm installVerify that OLM is installed. There should be two new namespaces, olm and operators created as a result.
kubectl get nsNAME STATUS AGE
kube-system Active 7d1h
default Active 7d1h
kube-public Active 7d1h
kube-node-lease Active 7d1h
operators Active 94s
olm Active 94s
Verify that the OLM Pods are running in the olm namespace.
kubectl get pods -n olmNAME READY STATUS RESTARTS AGE
catalog-operator-569cd6998d-h5cbp 1/1 Running 0 39s
olm-operator-6fbbcd8c8b-qzv47 1/1 Running 0 39s
operatorhubio-catalog-m7qxq 1/1 Running 0 31s
packageserver-6cb8b48df4-wp89m 1/1 Running 0 30s
packageserver-6cb8b48df4-ww62h 1/1 Running 0 30s
That's it, OLM should be installed and availble to manage the Dapr Operator.
The dapr-kubernetes-operator provides a pre-made kustomization file to deploy the Dapr Kubernetes Operator with OLM:
kubectl apply -k https://github.com/dapr/kubernetes-operator//config/samples/olmThis command should:
- Create a
dapr-systemnamespace - Create a
CatalogSourcein theolmnamespace➜ kubectl get catalogsources -n olm NAME DISPLAY TYPE PUBLISHER AGE daprio-catalog dapr.io catalog grpc dapr.io 11m operatorhubio-catalog Community Operators grpc OperatorHub.io 18m
- Create an
OperatorGroupin thedapr-systemnamespace➜ kubectl get operatorgroups -n dapr-system NAME AGE dapr-operator 12m
- Create a new
Subscriptionfor theDapr Kubernetes Operator in the newdapr-systemnamespace.The subscription should result in an➜ kubectl get subscriptions.operators.coreos.com -n dapr-system NAME PACKAGE SOURCE CHANNEL dapr-control-plane dapr-kubernetes-operator daprio-catalog alpha
InstallPlanbeing created in thedapr-systemnamespace which finally result in thedapr-control-planePod running➜ kubectl get pods -n dapr-system NAME READY STATUS RESTARTS AGE dapr-control-plane-66866765b9-nzb6t 1/1 Running 0 13m
Once the operator is installed and running, new DaprControlPlane resources can be created.
You can clean up the operator resources by running the following commands.
kubectl delete -k https://github.com/dapr/kubernetes-operator//config/samples/olm