kubernetes 썸네일형 리스트형 쿠버네티스 클러스터를 멀티 마스터 환경에서 고가용성을 구현하는 방법 쿠버네티스 클러스터(Kubernetes Cluster)를 멀티 마스터(Multi Master) 환경에서 고가용성(Highly Available)을 구현하는 방법쿠버네티스 클러스터를 멀티 마스터 환경에서 고가용성(HA)을 구현하는 것은 클러스터의 Control Plane을 여러 마스터 노드로 분산하여 단일 장애 지점을 없애는 중요한 작업입니다. 이를 통해 클러스터의 신뢰성과 가용성을 높일 수 있습니다. HostnameIP AddressApplication k8s-lb1192.168.0.130haproxy k8s-master1192.168.0.131kubelet kubeadm kubectl k8s-master2192.168.0.132kubelet kubeadm kubectl k8s-master3192.168.. 더보기 쿠버네티스 패키지와 설정을 완전히 삭제하는 방법 쿠버네티스 패키지와 설정을 완전히 삭제하는 방법쿠버네티스와 관련된 모든 패키지, 설정 파일, 데이터 파일을 제거합니다.패키지 제거쿠버네티스 관련 패키지를 제거하기 전에 패키지 업그레이드를 막아놓은 경우 이를 해제해야 합니다.sudo apt-mark unhold kubelet kubeadm kubectlsudo apt-get purge -y kubelet kubeadm kubectlsudo apt-mark unhold containerdsudo apt-get purge -y containerd자동으로 설치된 패키지와 의존성 제거더 이상 필요하지 않은 패키지와 의존성을 제거합니다.sudo apt-get autoremove -y설정 및 데이터 파일 삭제Kubernetes와 관련된 설정 및 데이터 파일을 삭제합.. 더보기 node-app 도커 이미지를 쿠버네티스로 배포하는 방법 node-app 도커 이미지를 쿠버네티스(Kubernetes)로 배포하는 방법 node-app-deployment.yaml 파일 생성 vim node-app-deployment.yaml # node-app-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: node-app # Deployment의 이름 spec: replicas: 1 # Replica 수 selector: matchLabels: app: node-app # Pod를 식별하기 위한 라벨 template: metadata: labels: app: node-app # Pod에 부여되는 라벨 name: node-app # Pod의 이름 spec: containers: - n.. 더보기 쿠버네티스 네임스페이스를 생성하고 확인하고 삭제하는 방법(namespaces) 쿠버네티스 네임스페이스를 생성하고 확인하고 삭제하는 방법(namespaces) 쿠버네티스에서는 네임스페이스를 통해 리소스를 격리하고 조직화할 수 있습니다. 네임스페이스 확인 kubectl get namespaces $ kubectl get namespaces NAME STATUS AGE default Active 2d1h ingress-nginx Active 2d1h kube-node-lease Active 2d1h kube-public Active 2d1h kube-system Active 2d1h metallb-system Active 2d1h kubectl get pods --namespace kube-system kubectl get all --namespace kube-system 네임스페이스 .. 더보기 [kubernetes] kubectl get 명령 kubectl get 명령 kubectl get field selector kubectl get pods -o wide --field-selector status.phase=Running $ kubectl get pods -o wide --field-selector status.phase=Running NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES myapp-rs-dynamic-4gchk 1/1 Running 0 23m 10.233.118.66 kube-node3 myapp-rs-dynamic-7wqq4 1/1 Running 0 23m 10.233.73.68 kube-node1 myapp-rs-dynamic-bgmf5 1/1 .. 더보기 [kubernetes] kubectl delete 명령 kubectl delete 명령 Delete resources by file names, stdin, resources and names, or by resources and label selector. 사용법 Examples: # Delete a pod using the type and name specified in pod.json kubectl delete -f ./pod.json # Delete resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml kubectl delete -k dir # Delete a pod based on the type and name in the JSON passed i.. 더보기 [kubernetes] 쿠버네티스 워크로드 - 네임스페이스(namespaces) 워크로드 - 네임스페이스(namespaces) 네임스페이스 확인 kubectl get namespaces $ kubectl get namespaces NAME STATUS AGE default Active 2d1h ingress-nginx Active 2d1h kube-node-lease Active 2d1h kube-public Active 2d1h kube-system Active 2d1h metallb-system Active 2d1h kubectl get pods --namespace kube-system kubectl get all --namespace kube-system 네임스페이스 생성 kubectl create namespace infrateam $ kubectl create namesp.. 더보기 [kubernetes] 쿠버네티스 볼륨(Volume) - 정적 프로비저닝(Static Provisioning) / nfs 쿠버네티스 정적 프로비저닝(Static Provisioning) nfs 서버 구성(kube-control1) - nfs 서버 구성 : https://sangchul.kr/432 nfs 클라이언트 구성(kube-node1, kube-node2, kube-node3) sudo apt install -y nfs-common showmount -e 192.168.56.11 $ showmount -e 192.168.56.11 Export list for 192.168.56.11: /nfs-directory/shares-data1 192.168.56.0/24 PV(Persistent Volume) 생성 nfs-pv1.yaml 파일 작성 vim nfs-pv1.yaml apiVersion: v1 kind: Persis.. 더보기 이전 1 2 3 4 5 6 다음