dev-resources.site
for different kinds of informations.
Install Kubernetes Controllers via Operators - ARGO CD
Published at
11/7/2023
Categories
beginners
kubernetescontroller
argocd
operators
Author
jasper475
Author
9 person written this
jasper475
open
Install Operator
- Go to operatorhub.io
- Install Operator
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0
- Install ArgoCD Operator
-
kubectl create -f https://operatorhub.io/install/argocd-operator.yaml
PS C:\WINDOWS\system32> kubectl create -f https://operatorhub.io/install/argocd-operator.yaml
subscription.operators.coreos.com/my-argocd-operator created
- Verify ArgoCD Operator Installed or not
-
kubectl get csv -n operators
PS C:\WINDOWS\system32> kubectl get csv -n operators
NAME DISPLAY VERSION REPLACES PHASE
argocd-operator.v0.7.0 Argo CD 0.7.0 argocd-operator.v0.6.0 Pending
argocd-operator.v0.7.0 Argo CD 0.7.0 argocd-operator.v0.6.0 Installing
argocd-operator.v0.7.0 Argo CD 0.7.0 argocd-operator.v0.6.0 Succeeded
- Create ARGOCD Controller: Use manifest to create a new Argo CD cluster
source: ARGOCD documentation
Go to Usage > Basic > save below in argo-cd-manifest.yml
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
name: my-argocd
labels:
example: basic
spec: {}
Warning: ArgoCD v1alpha1 version is deprecated and will be converted to v1beta1 automatically. Moving forward, please use v1beta1 as the ArgoCD API version.
- Run Manifest command
kubectl apply -f argo-cd-manifest.yml
$ kubectl apply -f argo-cd-manifest.yml
$ kubectl apply -f argoctl.yml
argocd.argoproj.io/my-argocd created
OR
argocd.argoproj.io/example-argocd created
- Verify operator pods are created
kubectl get pods
PS C:\WINDOWS\system32> kubectl get pods
NAME READY STATUS RESTARTS AGE
my-argocd-application-controller-0 1/1 Running 3 21h
my-argocd-redis-6b8667cdb8-jnmm6 1/1 Running 2 (31m ago) 21h
my-argocd-repo-server-5d547c6f69-mgsnn 1/1 Running 22 (31m ago) 21h
my-argocd-server-bbdf5fdff-ccc2w 1/1 Running 23 (19h ago) 21h
Get service server Run list of services
kubectl get svc
Expose
my-argocd-server
fromClusterIP
toNodePort
to access via browserkubectl edit svc my-argocd-server
PS C:\WINDOWS\system32> kubectl edit svc example-argocd-server
service/example-argocd-server edited
PS C:\WINDOWS\system32> kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
example-argocd-metrics ClusterIP 10.106.206.190 <none> 8082/TCP 21h
example-argocd-redis ClusterIP 10.98.228.6 <none> 6379/TCP 21h
example-argocd-repo-server ClusterIP 10.104.167.116 <none> 8081/TCP,8084/TCP 21h
example-argocd-server NodePort 10.108.236.251 <none> 80:30904/TCP,443:31659/TCP 21h
example-argocd-server-metrics ClusterIP 10.104.220.61 <none> 8083/TCP 21h
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 22h
- Get the list of services and its URL to open in browser
minikube service list
PS C:\WINDOWS\system32> minikube service list
|-------------|----------------------------------------------------|--------------|-----------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-------------|----------------------------------------------------|--------------|-----------------------------|
| default | example-argocd-metrics | No node port | |
| default | example-argocd-redis | No node port | |
| default | example-argocd-repo-server | No node port | |
| default | example-argocd-server | http/80 | http://192.168.59.102:30904 |
| | | https/443 | http://192.168.59.102:31659 |
| default | example-argocd-server-metrics | No node port | |
| default | kubernetes | No node port | |
| default | spring-boot-app-service | http/80 | http://192.168.39.101:30296 |
| kube-system | kube-dns | No node port | |
| olm | operatorhubio-catalog | No node port | |
| olm | packageserver-service | No node port | |
| operators | argocd-operator-controller-manager-metrics-service | No node port | |
|-------------|----------------------------------------------------|--------------|-----------------------------|
- Open browser and access via local server/port forwarded http://192.168.59.102:32600 as seen in below picture.
- Enter: username=admin password=''
- To get password run
-
kubectl get secret
- secret is stored inmy-argocd-cluster
-
kubectl edit secret my-argocd-cluster
PS C:\WINDOWS\system32> kubectl get secret
NAME TYPE DATA AGE
argocd-secret Opaque 5 11m
my-argocd-ca kubernetes.io/tls 3 11m
my-argocd-cluster Opaque 1 11m
my-argocd-default-cluster-config Opaque 4 11m
my-argocd-tls kubernetes.io/tls 2 11m
PS C:\WINDOWS\system32> kubectl edit secret my-argocd-cluster
- By default, password in store in base64 encoded format, run below command to get password from base64 encode to text
- convert base64 to plain text
echo echo enlkaXd1UEZCNVhoSXJUNGo3UXBvMkpNV2dTdmFaOUU= | base64 -d
-
To reset password to
password
#bcrypt(password)=$2a$10$rRyBsGSHK6.uc8fntPwVIuLVHgsAhAX7TcdrqW/RADU0uh7CaChLa
kubectl -n argocd patch secret argocd-secret \
-p '{"stringData": {
"admin.password": "$2a$10$rRyBsGSHK6.uc8fntPwVIuLVHgsAhAX7TcdrqW/RADU0uh7CaChLa",
"admin.passwordMtime": "'$(date +%FT%T%Z)'"
}}'
PS C:\WINDOWS\system32> kubectl get secret
NAME TYPE DATA AGE
argocd-secret Opaque 5 22h
example-argocd-ca kubernetes.io/tls 3 22h
example-argocd-cluster Opaque 1 22h
example-argocd-default-cluster-config Opaque 4 22h
example-argocd-tls kubernetes.io/tls 2 22h
ARGO CD - App configuration:
- Dashboard
operators Article's
30 articles in total
Essential MySQL Operators and Their Applications
read article
Exposing replica nodes in Percona Operator for PostgreSQL
read article
It’s just ‘,’ – The Comma Operator
read article
Operators, Conditionals and Inputs
read article
Practical Guide to Python Conditional Statements
read article
Python Operators Demystified
read article
SQL Operators Made Easy for Beginners
read article
First Steps in SQL Operators: A Beginner's Guide
read article
AND / OR operators, Short-Circuiting and Nullish Coalescing in Javascript
read article
From Zero to Hero: Disaster Recovery for PostgreSQL with Streaming Replication in Kubernetes
read article
Google Search Operators & Usage Tips
read article
Operators in C programming
read article
MySQL Operators – A Guide
read article
Annotations in Kubernetes Operator Design
read article
Exploring the unusual: JavaScript arrays and the 'in' operator
read article
Install Kubernetes Controllers via Operators - ARGO CD
currently reading
Mastering Advanced JavaScript Operators: The Ultimate Guide
read article
Operators in JavaScript: The Fundamentals
read article
Dart as, is, is! operatörleri
read article
Nullish Coalescing Operator
read article
Difference between ? and ?? in JavaScript/Typescript
read article
Ordering Event Bus Events with RxJS and concatMap
read article
Division, Floor Division and Modulus - Python Arithmetic Operators every beginner should know.
read article
Operators in Python
read article
Angular - Rxjs - Operator mergeAll
read article
Angular - Rxjs - Operator map
read article
Swift — 11 Useful Combine Operators You Need to Know
read article
Cloud Native CICD Pipelines in OpenShift
read article
Kubernetes Operators to realize the dream of Zero-Touch Ops
read article
JavaScript Basic - Variable, Data Types, Operators, Comparisons
read article
Featured ones: