


curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
sudo 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
aws eks --region ca-central-1 update-kubeconfig --name dev-eks
kubectl get nodes

kubectl create ns argocd
kubectl get ns

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl get all -n argocd
(설치하는 데 시간이 1-2분 정도 소요)

kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'



안전하지 않음으로 이동
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo





오류
- dev 네임스페이스 생성
kubectl create namespace dev
- argocd의 project.yaml 파일 작성
# cat > project.yaml << EOF apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: name: development labels: app: development spec: # Project description description: Dev ArgoCD Project to deploy our app locally # Allow manifests to deploy only from Sokube git repositories sourceRepos: - "https://github.com/surenraju/*" # Only permit to deploy applications in the same cluster destinations: - namespace: dev server: https://kubernetes.default.svc # Enables namespace orphaned resource monitoring. orphanedResources: warn: false EOF
- argocd 프로젝트 생성
kubectl create -n argocd -f project.yaml
- argocd 어플리케이션 작성(어플리케이션 배포 방법을 정의)
cat > application.yaml << EOF apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: nginx-app labels: app: nginx-app spec: destination: namespace: dev server: 'https://kubernetes.default.svc' source: path: helm repoURL: 'https://github.com/surenraju/nginx-gitops.git' targetRevision: HEAD helm: valueFiles: - values.yaml project: development syncPolicy: automated: prune: true selfHeal: true EOF
- argocd 어플리케이션 생성
k create -n argocd -f application.yaml
- 곧바로 sync 실행됨 => dev 네임스페이스에 여러 리소스가 생성 시작됨(?)
=> missing(sync fail)
