이세개발
article thumbnail

이곳에서 패스워드를 변경 가능하다.

 

적당히 git repository를 만들고 파일을 구성해준다.

 

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hello-nginx
  template:
    metadata:
      labels:
        app: hello-nginx
    spec:
      containers:
        - name: hello-nginx
          image: nginx:latest
          ports:
            - containerPort: 80

service.yaml

apiVersion: v1
kind: Service
metadata:
  name: hello-nginx
spec:
  selector:
    app: hello-nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: ClusterIP

간단한 nginx 디플로이먼트를 80포트로 서비스하는 yaml이다.

 

argocd로 돌아가서 Repositories를 찾는다.

repositoy 주소를 넣어주고 확인 (여러 방법이 있지만 간단하게 https 로 연동하였다)

 

만약 private repo라면 깃헙에서 Deploy Keys를 받고 ssh방식으로 연동하는 방법도 된다.

연동이 잘 되었다.

 

앱을 생성해본다

 

자동 배포, 매뉴얼배포 등 여러가지 옵션들이 있다.
기본적인 설정만 하고 앱을 만든다.

잘 작동이 된다.

 

profile

이세개발

@print(name)

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!