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 dapr
Install 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-sdk
command
operator-sdk olm install
Verify that OLM is installed. There should be two new namespaces, olm
and operators
created as a result.
kubectl get ns
NAME 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 olm
NAME 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/olm
This command should:
- Create a
dapr-system
namespace - Create a
CatalogSource
in theolm
namespace➜ 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
OperatorGroup
in thedapr-system
namespace➜ kubectl get operatorgroups -n dapr-system NAME AGE dapr-operator 12m
- Create a new
Subscription
for theDapr Kubernetes Operator in the newdapr-system
namespace.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
InstallPlan
being created in thedapr-system
namespace which finally result in thedapr-control-plane
Pod 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