카카오 클라우드 스쿨 2기 박성호, 이가은, 이강인
1) 키워드 : MSA 홈페이지를 운영한다고 가정했을 때, 메인페이지, 게시판, 회원가입 파드를 각각 만들어 각 서비스마다 다른 URL 을 주어 마이크로서비스(MSA)가 가능하도록 구축하였습니다.
2) 키워드 : CI/CD 및 카나리 배포 기능 추가 혹은 업데이트가 필요할 경우를 대비하여 Jenkins 를 사용해 CI/CD가 가능하도록 구축하였으며, 카나리 업그레이드를 통하여 새로운 기능 추가 후 테스트할 수 있는 환경까지 구축하였습니다.
3) 키워드 : 모니터링 각 파드 및 인그레스에 이상 유무를 모니터링 할 수 있도록 쿠버네티스 대시보드 기능을 활용하였습니다.
박성호 : Jenkins를 활용한 CI/CD 및 DNS 서버 등록, 시연 영상 촬영
이가은 : Pod별 이미지 생성 및 Ingress 적용, 대쉬보드 환경 구축, PPT 작성
이강인 : Jenkins를 활용한 CI/CD 및 Canary 배포, 시연 영상 촬영 보조
root@master:~# mkdir /home/homepage
root@master:~# cd /home/homepage
# ingress-nginx 설치
root@master:~/in# wget <https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/baremetal/deploy.yaml>
root@master:~/in# ls
deploy.yaml
root@master:~/in# vi deploy.yaml
# nodePort 추가하기
365 ports:
366 - appProtocol: http
367 name: http
368 port: 80
369 protocol: TCP
370 targetPort: http
371 nodePort: **30494**
372 - appProtocol: https
373 name: https
374 port: 443
375 protocol: TCP
376 targetPort: https
377 nodePort: **30794**
root@master:/home/homepage# kubectl apply -f deploy.yaml
namespace/ingress-nginx created
serviceaccount/ingress-nginx created
serviceaccount/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx unchanged
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission unchanged
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx unchanged
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission unchanged
configmap/ingress-nginx-controller created
service/ingress-nginx-controller created
service/ingress-nginx-controller-admission created
deployment.apps/ingress-nginx-controller created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created
ingressclass.networking.k8s.io/nginx unchanged
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission
# ingress-nginx-controller Running 확인하기 -> 시간이 조금 걸림!
root@master:/home/homepage# kubectl get svc,pod -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingress-nginx-controller NodePort 10.106.163.235 <none> 80:30431/TCP,443:30798/TCP 96s
service/ingress-nginx-controller-admission ClusterIP 10.102.231.165 <none> 443/TCP 96s
NAME READY STATUS RESTARTS AGE
pod/ingress-nginx-admission-create-872gp 0/1 Completed 0 96s
pod/ingress-nginx-admission-patch-b94d5 0/1 Completed 0 96s
pod/ingress-nginx-controller-64f79ddbcc-phz9m 1/1 Running 0 96s