Container (16) 썸네일형 리스트형 [Kubernetes] Application 기능으로 이해하기 - Deployment - Deployment -> ReplicaSet -> Pod ㅁ실습 > 1. RollingUpdate 하기// 1) HPA minReplica 2로 바꾸기 (이전 강의에서 minReplicas를 1로 바꿔놨었음)kubectl patch -n anotherclass-123 hpa api-tester-1231-default -p '{"spec":{"minReplicas":2}}'// 1) 그외 Deployment scale 명령kubectl scale -n anotherclass-123 deployment api-tester-1231 --replicas=2// 1) edit로 모드로 직접 수정kubectl edit -n anotherclass-123 deployment api-tester-1231// 2) .. [Kubernetes] Application 기능으로 이해하기 - PV/PVC - PV : Persistence Volume- PVC : Persistence Volume Claim > 1~4 local 동작확인// 1번 API - 파일 생성http://192.168.56.30:31231/create-file-podhttp://192.168.56.30:31231/create-file-pv// 2번 - Container 임시 폴더 확인[root@k8s-master ~]# kubectl exec -n anotherclass-123 -it -- ls /usr/src/myapp/tmp// 2번 - Container 영구저장 폴더 확인[root@k8s-master ~]# kubectl exec -n anotherclass-123 -it -- ls /usr/src/myapp/files/.. [Kubernetes] Application 기능으로 이해하기 - Configmap, Secret > Configmap : pod내 환경변수 설정- pod가 생성될때 한번만 주입, 때문에 pod를 재시작 해야만 수정된 Configmap 적용됨.- data(Configmap) envForm(pod)- data(Configmap) Volume Mounts : mountPath(pod) > Secret : pod내 volume과 연결되어 변수 설정- Secret을 Volume Mounts로 연결해 놓았기 때문에, 수정시 즉시 반영,- stringData(Secret) -> data(Secret, base64로 인코딩) Volume Mounts : mountPath(pod) [ Configmap ] [ Secret ]- Secret을 Base64로 저장하는 이유 : 인증서와 같은 바이너리 파일의 경우 .. [Kubernetes] Application 기능으로 이해하기 - Probe > startupProbe(App 초기화에 대한 점검)- App기동시 API를 호출(httpGet:path)하여, 10초의 간격(periodSeconds)으로 총 10번의 실패(failureThreshold) 전에 1번의 성공(successThreshold) 응답(200 OK)을 받으면 중지.- 이후 readinessProbe와 livenessProbe 실행> livenessProbe(App 상태 점검)- App이 살아 있는지 검사. 2번 실패(failureThreshold)하면 pod 재기동 > readinessProbe(외부 API 접근 가능 여부 점검)- 외부 트래픽을 pod가 받을수 있는 상태인지 검사하면서 서비스가 활성화. 즉 Service(selector)와 Pod(labels) 연결. ㅁ .. [Kubernetes] Object 그려보며 이해하기 > master node에 접속하여 폴더생성[root@k8s-master ~]# mkdir -p /root/k8s-local-volume/1231 > dashboard 접속 후 Namespace[모든 네임스페이스] -> [+]버튼 -> [입력을 통해 생성] -> yaml 파일 붙여넣기 -> 업로드 ▶ NamespaceapiVersion: v1kind: Namespacemetadata: name: anotherclass-123 labels: part-of: k8s-anotherclass managed-by: dashboard▶ DeploymentapiVersion: apps/v1kind: Deploymentmetadata: namespace: anotherclass-123 name: ap.. [Kubernetes] 표준 생태계 - CNCF 멤버이면서 github stars가 높은 도구 기준으로 선정. 이전 1 2 다음