[Kubernetes] Kustomize

목차 Kustomize 란? Kustomize 설치 Completion 설정 Kustomize 기본 Kustomize build Run kustomize resources 추가 patch prefix/label secretGenerator 이용 overlay 적용 참고 자료 Kustomize 란? Kustomize는 쿠버네티스 구성을 사용자 정의화하는 도구이다. 이는 애플리케이션 구성 파일을 관리하기 위해 다음 기능들을 가진다. 다른 소스에서 리소스 생성 리소스에 대한 교차 편집 필드 설정 리소스 집합을 구성하고 사용자 정의 (https://kubernetes.io/ko/docs/tasks/manage-kubernetes-objects/kustomization/#kustomize-%EA%B0%9C%EC%9A%94 발췌) 개인적으론 Helm 보다 Kustomize 가 사용하기 좋았다....

December 1, 2021 · chhanz

[Kubernetes] HTTPS ingress 적용 (use prometheus)

HTTPS ingress 적용 이전에 배포한 kube-prometheus 의 ingress 를 TLS 적용하여 HTTPS 로 서비스 해보도록 하겠습니다. TLS 방식 Kubernetes 에서 사용이 가능한 TLS 방식은 아래와 같습니다. 아래 내용은 OpenShift 기준으로 작성된 내용이지만 이해하기 좋아서 첨부합니다. Clear 방식 (clear to clear) : 일반적인 HTTP 서비스 Edge 방식 (TLS to clear) : client 와 ingress 구간을 TLS 암호화하는 방식 Re-encrypt 방식 (TLS1 to TLS2) : ingress 기점으로 TLS 암호화를 다르게 하는 방식(두번의 TLS 암호화) Pass-Through 방식 (TLS1 to TLS1) : Application 단에서 TLS 암호화 처리하는 방식 TLS 적용 위의 설명된 방식중 Edge 방식을 적용 해보도록 하겠습니다....

November 8, 2021 · chhanz

[Kubernetes] kube-prometheus 배포 (use storageclass)

kube-prometheus 배포 Kubernetes cluster 를 모니터링 하기 위해 Prometheus 를 구성하고 사용하려고 한다. Prometheus 에는 다양한 배포 방법이 있으나 이번 글에선 kube-prometheus 를 이용하여 Kubernetes Cluster 에 배포 해보도록 한다. Kubernetes Cluster 정보 사용된 Kubernetes Cluster 환경은 아래와 같습니다. root@node1:~# kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME node1 Ready control-plane,master 41d v1.20.7 192.168.200.26 <none> Ubuntu 20.04.2 LTS 5.4.0-80-generic cri-o://1.20.3 node2 Ready control-plane,master 41d v1....

September 30, 2021 · chhanz

[Kubernetes] Update App (Rolling Update / Rollback)

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Update APP 이 문서는 Rolling Update / Rollback APP 에 대한 방법을 포함하고 있습니다. Update Source 아래와 같이 Source 를 UPDATE 가 되었습니다....

September 28, 2020 · chhanz

[Kubernetes] Scale App (kubectl scale)

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Scale APP 이 문서는 Pod 을 Scale-out 하는 방법에 대해 포함되어 있습니다. Scale 개요 Before After...

September 27, 2020 · chhanz

[Kubernetes] Expose App (Service 생성)

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Expose APP 이 문서는 Service 생성에 대해 포함된 문서입니다. Service 란? Kubernetes Pod 들은 언젠가는 죽게됩니다....

September 25, 2020 · chhanz

[Kubernetes] App 확인 (Pod 확인)

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Check The Pod 이 문서는 Pod 를 확인하는 방법에 대해 포함되어 있습니다. Kubernetes Pod 앞선 Create the Deployment 를 통해 Deployment 가 생성이 되고 나면...

September 24, 2020 · chhanz

[Kubernetes] Node 상태 확인

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Check The Node 이 문서는 Kubernetes Node 를 확인하는 방법에 대해 포함되어 있습니다. Kubernetes Node Kubernetes Node 는 최소한 다음과 같이 동작합니다....

September 24, 2020 · chhanz

[Kubernetes] Deployment 생성

목차 Build APP - Container image Deploy APP Build APP Create The Deployment Check APP Check The Node Check The APP Expose APP Expose APP - NodePort Scale APP Scale APP Update APP Update APP - Rolling Update/Rollback Create the Deployment 이 문서는 Kubernetes 의 Deployment 를 생성하는 방법에 대해 포함되어 있습니다. Deployment 란?...

September 23, 2020 · chhanz

[Kubernetes] Ansible 으로 k3s 배포하기 (on VMware)

Ansible 을 이용하여 k3s 배포해보자 Ansible.fast-k3s 란? 저는 평소엔 사내 교육이나 테스트를 위해 주로 Minikube 를 이용하였습니다. Minikube 도 Linux laptop 인지 Windows (version) laptop 인지 Mac 인지 확인해서 설치를 가이드 해야되는 불편함이 있었습니다. 그래서 VMware (vCenter) 에 생성되어 있는 Template 를 이용하여 자동으로 Kubernetes 테스트 환경을 만드는 Playbook 을 만들었습니다. Requirements 현재는 VMware 만 VM Provisioning 하도록 만들어져 있습니다. 향후에 필요하다면 KVM / RHV / oVirt 등 개발 예정입니다....

September 5, 2020 · chhanz