当前位置:网站首页>Continuous deployment tools Argo CD - install

Continuous deployment tools Argo CD - install

2021-09-15 04:29:51 Concentrate on writing bugs

1. Deploy argocd service

Download deployment yaml file

wget https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Modify the deployment file , Build Intranet gitlab The address of is bound to deployment pod in

hostAliases:    
- ip: "34.92.55.211"
  hostnames:
    - "local.gitlab.com"

Start the service

kubectl create ns argocd
kubectl apply -n argocd -f ./install.yaml

2. expose web The entrance of the end

install nginx-ingress-controller, open Official installation documentation Copy the corresponding installation command , Such as Docker Desktop The order of

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.0/deploy/static/provider/cloud/deploy.yaml

After installation, check the exposed address

$ kubectl get svc -n ingress-nginx
NAME                                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx-controller             LoadBalancer   10.112.10.124   34.92.81.71   80:30885/TCP,443:30521/TCP   18m
ingress-nginx-controller-admission   ClusterIP      10.112.3.119    <none>        443/TCP                      18m

add to argocd ingress file

apiVersion: extensions/v1beta1
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.local
    http:
      paths:
      - backend:
          serviceName: argocd-server
          servicePort: https
  tls:
  - hosts:
    - argocd.example.com
    secretName: argocd-secret # do not change, this is provided by Argo CD

Be sure to pay attention to the service provider's firewall rules !!!!! dizzy
Modify local hosts file

34.92.81.71 argocd.local

By visiting https://argocd.local Access to the UI Console

3. install argocd cil Command tool

see Installation document
linux The next is like :

curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
chmod +x /usr/local/bin/argocd

Get initial password

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

land argocd service

argocd login <ARGOCD_SERVER_HOST>

modify admin Administrator password

argocd account update-password

Okay , Now you can log in with the changed password web Management end .

版权声明
本文为[Concentrate on writing bugs]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/09/20210909112544902j.html

随机推荐