контроллер_argocd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
контроллер_argocd [2024/02/26 12:34]
val [Управление приложениями через kubectl]
контроллер_argocd [2024/03/16 11:22] (current)
val [Управление приложениями через kubectl]
Line 3: Line 3:
   * [[https://​www.digitalocean.com/​community/​tutorials/​how-to-deploy-to-kubernetes-using-argo-cd-and-gitops|How to Deploy to Kubernetes using Argo CD and GitOps]]   * [[https://​www.digitalocean.com/​community/​tutorials/​how-to-deploy-to-kubernetes-using-argo-cd-and-gitops|How to Deploy to Kubernetes using Argo CD and GitOps]]
   * [[https://​habr.com/​ru/​companies/​otus/​articles/​544370/​|Argo CD: готов к труду и обороне в Kubernetes]]   * [[https://​habr.com/​ru/​companies/​otus/​articles/​544370/​|Argo CD: готов к труду и обороне в Kubernetes]]
 +  * [[https://​habr.com/​ru/​articles/​674704/​|Рабочий пример использования ArgoCD]]
  
 ===== Развертывание и подключение к контроллеру ArgoCD ===== ===== Развертывание и подключение к контроллеру ArgoCD =====
Line 14: Line 15:
 cmder$ kubectl port-forward svc/​argocd-server -n argocd 8080:443 cmder$ kubectl port-forward svc/​argocd-server -n argocd 8080:443
  
-student@kube1:~kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="​{.data.password}"​ | base64 -d; echo+kube1:~kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="​{.data.password}"​ | base64 -d; echo
 </​code>​ </​code>​
  
Line 59: Line 60:
 ===== Управление приложениями через kubectl ===== ===== Управление приложениями через kubectl =====
  
-  * [[https://​argo-cd.readthedocs.io/​en/​release-1.8/​user-guide/​private-repositories/​|Argo CD Private Repositories]]+  * [[https://​argo-cd.readthedocs.io/​en/​release-1.8/​user-guide/​private-repositories/​#​managing-tls-certificates-using-the-argocd-web-ui|Managing TLS certificates using the ArgoCD web UI]]
  
 <​code>​ <​code>​
-student@server:​~/​argocd$ ​cat application.yaml+kube1# ​cat application.yaml
 </​code><​code>​ </​code><​code>​
 apiVersion: argoproj.io/​v1alpha1 apiVersion: argoproj.io/​v1alpha1
Line 69: Line 70:
   name: my-webd   name: my-webd
   namespace: argocd   namespace: argocd
 +  finalizers:
 +  - resources-finalizer.argocd.argoproj.io
 spec: spec:
   project: default   project: default
   source:   source:
-    repoURL: '​https://​server.corp13.un/​student/​gowebd-k8s.git'​+    repoURL: '​https://​server.corpX.un/​student/​gowebd-k8s.git'​
     path: webd-chart     path: webd-chart
 +
 +#    helm:
 +#      valuesObject:​
 +#        replicaCount:​ 3
 +#        image:
 +#          tag: "​ver1.1"​
 +#        REALM_NAME: "​corp"​
 +
   destination:​   destination:​
     server: '​https://​kubernetes.default.svc'​     server: '​https://​kubernetes.default.svc'​
Line 82: Line 93:
       - CreateNamespace=true       - CreateNamespace=true
 </​code><​code>​ </​code><​code>​
-student@server:​~/​argocd$ ​kubectl apply -f application.yaml+kube1# ​kubectl apply -f application.yaml
  
-student@server:​~/​argocd$ ​### kubectl delete -f application.yaml+kube1# ​### kubectl delete -f application.yaml
 </​code>​ </​code>​
 ===== Тестирование приложения ===== ===== Тестирование приложения =====
 <​code>​ <​code>​
-$ curl http://​gowebd.corpX.un+$ curl http://kube1 -H "​Host: ​gowebd.corpX.un"
  
 gitlab-runner@server:​~/​gowebd-k8s$ cat webd-chart/​Chart.yaml gitlab-runner@server:​~/​gowebd-k8s$ cat webd-chart/​Chart.yaml
Line 95: Line 106:
 appVersion: "​ver1.N"​ appVersion: "​ver1.N"​
 </​code><​code>​ </​code><​code>​
-$ curl http://gowebd.corpX.un+ИЛИ 
 + 
 +Gitlab 
 +  ​gowebd-k8s 
 +    values.yaml 
 +      replicaCount:​ 3 
 +    Chart.yaml  
 +      appVersion: "ver1.N"
 </​code>​ </​code>​
  
контроллер_argocd.1708940047.txt.gz · Last modified: 2024/02/26 12:34 by val