Minikube

A installation guide for Operator Lifecycle Manager, Argo CD Operator (Helm), Argo CD, Argo CD CLI and the Guestbook Example in Minikube.

Note

You have to be in the cluster-admin ClusterRole to install all prerequisites, the operator and Argo CD.

Prerequisites

minikube Kubernetes Operator Lifecycle Manager

Operator Lifecycle Manager

The Operator Lifecycle Manager (OLM) extends Kubernetes to provide a declarative way to install, manage, and upgrade Kubernetes native applications (Operators) and their dependencies in a cluster, in an effective, automated and scalable way.

kubectl apply -f \
https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/crds.yaml

kubectl apply -f \
https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/olm.yaml

kubectl rollout status -w deployment/olm-operator -n olm
kubectl rollout status -w deployment/catalog-operator -n olm
kubectl rollout status -w deployment/packageserver -n olm

Operator Installation

It’s possible to install the operator using the Operator Lifecycle Manager or manually.

Note

The operator manages a single namespace installation of Argo CD. Therefore you have to install the operator and Argo CD in the same namespace. For simplicity we recommend creating a namespace argocd.

Operator Lifecycle Manager

This installation method installs the operator using an OLM Catalog.

git clone
kubectl apply -f guides/k8s/olm/namespace.yaml
kubectl apply -f guides/k8s/olm/catalog-source.yaml
kubectl apply -f guides/k8s/olm/operator-group.yaml
kubectl apply -f guides/k8s/olm/subscription.yaml

kubectl rollout status -w deployment/argocd-operator-helm -n argocd

Manual

You can install the operator from local sources without having to install an OLM Catalog. This can be helpful if your cluster runs in an isolated environment with no direct internet access.

Note

No channel subscription and automatic operator updates available with this method.

git clone
kubectl apply -f guides/k8s/manual/namespace.yaml
kubectl apply -f guides/k8s/manual/service-account.yaml
kubectl apply -f guides/k8s/manual/role.yaml
kubectl apply -f guides/k8s/manual/role-binding.yaml
kubectl apply -f guides/k8s/manual/crd.yaml
kubectl apply -f guides/k8s/manual/deployment.yaml

kubectl rollout status -w deployment/argocd-operator-helm -n argocd

Argo CD Installation

Install Argo CD server components and Argo CD command line interface.

Argo CD

Note

This operator shares all configuration values from the Argo CD Helm Chart.

git clone
kubectl apply -f examples/k8s.yaml -n argocd
kubectl get ArgoCDs argocd -n argocd

kubectl rollout status -w deployment/argocd-application-controller -n argocd
kubectl rollout status -w deployment/argocd-dex-server -n argocd
kubectl rollout status -w deployment/argocd-redis -n argocd
kubectl rollout status -w deployment/argocd-repo-server -n argocd
kubectl rollout status -w deployment/argocd-server -n argocd

Argo CD Ingress

For simplicity we use port forwarding.

kubectl port-forward svc/argocd-server -n argocd 9001:443
Point your Browser to ../_images/common_argocd_login.png

Argo CD CLI

Argo CD provides a command line interface. To be in sync with your Argo CD version you can download it directly from the Argo CD installation.

Download CLI

curl --insecure https://localhost:9001/download/argocd-linux-amd64 -o argocd

Login Argo CD

argocd login --insecure --username admin --password admin localhost:9001

Guestbook Example

Now lets play and install the Guestbook Example.

New Application

argocd app create guestbook \
--repo https://github.com/argoproj/argocd-example-apps.git \
--path helm-guestbook \
--dest-server https://kubernetes.default.svc \
--dest-namespace default

Sync Application

argocd app sync guestbook

Cleanup

Ants are very clean species too!

Guestbook Example

argocd app delete guestbook

Argo CD installation

The uninstallation process will remove the Argo CD installation (CR) but NOT the CRD’s. You have to remove them manually:

kubectl delete ArgoCD argocd -n argocd

kubectl delete crd appprojects.argoproj.io
kubectl delete crd applications.argoproj.io

Operator Lifecycle Manager installation

kubectl delete -f guides/k8s/olm/subscription.yaml
kubectl delete csv argocd-operator-helm.v0.0.6 -n argocd
kubectl delete crd argocds.argoproj.io
kubectl delete -f guides/k8s/olm/catalog-source.yaml
kubectl delete -f guides/k8s/olm/operator-group.yaml
kubectl delete -f guides/k8s/olm/namespace.yaml

Manual installation

kubectl delete -f guides/k8s/manual/deployment.yaml
kubectl delete -f guides/k8s/manual/crd.yaml
kubectl delete -f guides/k8s/manual/role-binding.yaml
kubectl delete -f guides/k8s/manual/role.yaml
kubectl delete -f guides/k8s/manual/service-account.yaml
kubectl delete -f guides/k8s/manual/namespace.yaml