kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
wget https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
cp argocd-linux-amd64 /usr/local/bin/argocd
chomd +x /usr/local/bin/argocd
argocd version
argocd: v2.7.4+a33baa3
BuildDate: 2023-06-05T19:16:50Z
GitCommit: a33baa301fe61b899dc8bbad9e554efbc77e0991
GitTreeState: clean
GoVersion: go1.19.9
Compiler: gc
Platform: linux/amd64
FATA[0000] Argo CD server address unspecified
kubectl apply -n argocd -f install.yaml
아아 중간에 노드가 리소스 모자라다고 pod가 펜딩되서...^^:;
eksctl anywhere upgrade cluster 해줌.
내 벨레로 어디갔어..
pending만 보면 눈물 나는 병이 생길꺼만 같다...
고생하고 나면 이렇게 다 뜬다..
eksanywhere에서는 metalLB를 사용해서 그냥 서비스타입을 LB로 바꿔버렸다.
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
aws alb controller를 사용하는 경우 grpc 때문에 따로 추가해야되는 것이 있었다.
아래와 같이 추가해주면 된다.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: argocd
name: argocd-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/load-balaner-name: yusa-argocd
alb.ingress.kubernetes.io/conditions.argogrpc: |
[{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "Content-Type", "values":["application/grpc"]}}]
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/target-type: instance
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/tags: app=argo
alb.ingress.kubernetes.io/certificate-arn: ${자신의 ACM 서티 arn 넣기}
spec:
rules:
- host: argocd.XXX.XXX #만약에 서티 안쓰고 싶으면 그냥 이부분 빈칸으로 주면됨.
http:
paths:
- path: /
backend:
service:
name: argogrpc
port:
number: 443
pathType: Prefix
- path: /*
backend:
service:
name: argocd-server
port:
number: 443
pathType: ImplementationSpecific
tls:
- hosts:
- argocd.XXX.XXX
grpc 서비스 만들기
apiVersion: v1
kind: Service
metadata:
annotations:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
labels:
app: argogrpc
name: argogrpc
namespace: argocd
spec:
ports:
- name: "443"
port: 443
protocol: TCP
targetPort: 8080
selector:
app.kubernetes.io/name: argocd-server
sessionAffinity: None
type: NodePort
아래와같이 두개의 타겟그룹 모두 healthy가 된다!
https://github.com/argoproj/argo-cd/discussions/8199 깃허브 링크
무조건 연결이 https로 설정되야함.
argocd admin initial-password -n argocd
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
[root@ip-10-1-8-104 argoCD]# argocd login ${내 도메인넣기}
Username: admin
Password:
'admin:login' logged in successfully
Context '도메인뜬다' updated
아래와같이 버전이 나오게됨!
[root@ip-10-1-8-104 argoCD]# argocd version
argocd: v2.7.7+4650bb2
BuildDate: 2023-07-05T20:02:35Z
...
Platform: linux/amd64
argocd-server: v2.7.6+00c914a.dirty
BuildDate: 2023-06-20T20:51:13Z
...