argocd
Argo CD - Declarative GitOps CD for Kubernetes (argo-cd.readthedocs.io)
What Is Argo CD
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
Why Argo CD?
Application definitions, configurations, and environments should be declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand.
Getting Started
Non-HA:
Kubernetes version: v1.21.14
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.4.16/manifests/install.yaml
暴露访问方式一:ingress
# ingress-argocd.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server-ingress
namespace: argocd
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
# If you encounter a redirect loop or are getting a 307 response code
# then you need to force the nginx ingress to connect to the backend using HTTPS.
#
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: argocd.sdaas.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
name: https
tls:
- hosts:
- argocd.sdaas.com
secretName: argocd-secret # do not change, this is provided by Argo CD
暴露访问方式二:NodePort
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "ClusterIP"}}'
暴露访问方式三: port-forward
The API server can then be accessed using https://localhost:8080
kubectl port-forward svc/argocd-server -n argocd 8080:443
访问argocd ui
https://argocd.sdaas.com:30227
查看admin密码
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
guestbook
需要调试:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: guestbook-server-ingress
namespace: guestbook
spec:
rules:
- host: guestbook.sdaas.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kustomize-guestbook-ui
port:
name: http
标签:kubectl,ingress,name,argocd,server,io,argo,cd
From: https://www.cnblogs.com/wl30564/p/16871709.html