본문 바로가기

반응형

쿠버네티스

kubectl 명령어의 자동 완성을 활성화하는 방법 kubectl 명령어의 자동 완성을 활성화하는 방법 kubectl 자동 완성 스크립트를 다운로드 echo 'source 더보기
쿠버네티스에서 모든 리소스를 삭제하는 방법 쿠버네티스에서 모든 리소스를 삭제하는 방법 쿠버네티스 주요 리소스 목록 Pod (팟) 컨테이너화된 응용 프로그램의 실행 인스턴스입니다. 한 개 이상의 컨테이너를 포함할 수 있습니다. ReplicaSet Pod의 복제본을 관리합니다. 지정된 수의 Pod 복제본을 유지하고, 필요한 경우 새로운 복제본을 생성하거나 기존 복제본을 삭제합니다. Deployment 애플리케이션 배포를 관리합니다. ReplicaSet과 Pod를 조정하여 스케일링하고 롤링 업데이트를 수행합니다. Service 서비스에 대한 로드 밸런싱을 제공하고 네트워크 요청을 Pod로 전달합니다. 단일 접점으로 여러 Pod에 대한 액세스를 제공합니다. Ingress 클러스터 내의 서비스에 대한 외부 액세스를 관리합니다. 호스트 또는 경로 기반 라우.. 더보기
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.. 더보기
[kubernetes] kubectl config 명령 - 2 쿠버네티스 kubectl config 설정 쿠버네티스 컨트롤러 서버(linux) kubectl config view $ kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: DATA+OMITTED server: https://127.0.0.1:6443 name: cluster.local contexts: - context: cluster: cluster.local user: kubernetes-admin name: kubernetes-admin@cluster.local current-context: kubernetes-admin@cluster.local kind: Config preferences: {} us.. 더보기
[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] 쿠버네티스 워크로드 - 워크로드 리소스 쿠버네티스 워크로드 - 워크로드 리소스 디플로이먼트(Deployment) : 모든 Pod가 필요시 교체 또는 상호 교체할 수 있는 경우, 클러스터의 스테이트리스 애플리케이션 워크로드를 관리하기에 적합 레플리카셋(ReplicaSet) - 레거시 리소스 레플리케이션컨트롤러(ReplicationController)를 대체 : 레플리카 파드 집합의 실행을 항상 안정적으로 유지하는 것이다. 이처럼 레플리카셋은 보통 명시된 동일 파드 개수에 대한 가용성을 보증하는 데 사용한다. 스테이트풀셋(StatefulSet) : 어떻게든 스테이트(state)를 추적하는 하나 이상의 파드를 동작하게 해준다. 예를 들면, 워크로드가 데이터를 지속적으로 기록하는 경우, 사용자는 Pod와 PersistentVolume을 연계하는 St.. 더보기
[kubernetes] 쿠버네티스 볼륨(Volume) - hostPath 볼륨 쿠버네티스 hostPath 볼륨 hostPath 볼륨 hostPath 볼륨 생성 hostPath1.yaml 파일 작성 apiVersion: apps/v1 kind: ReplicaSet metadata: name: myapp-rs-hostpath spec: replicas: 2 selector: matchLabels: app: myapp-rs-hostpath template: metadata: labels: app: myapp-rs-hostpath spec: containers: - name: web-server image: nginx:alpine volumeMounts: - name: web-content mountPath: /usr/share/nginx/html readOnly: true ports: .. 더보기
[kubernetes] 쿠버네티스 볼륨(Volume) - emptyDir 볼륨 쿠버네티스 볼륨(Volume) 사용 사능한 볼륨 목록 emptyDir 임시로 데이터를 저장하는 빈 볼륨(디렉터리) gitRepo 내부적으로 emptyDir 기능을 이용하여 초기에 git 리포지토리의 내용을 채워서 제공하는 볼륨. 더 이상 사용되지 않음(Deprecated) hostPath 쿠버네티스 클러스터 노드(호스트)의 파일 시스템을 제공하는 볼륨 네트워크 스토리지 볼륨 nfs, cinder, cephfs, iscsi, glusterfs, quobyte, rbd, flexVolume, vsphereVolume, photonPersistentDisk 클라우드 스토리지 볼륨 gcePersistentDisk(GCE Persistent Disk), awsElasticBlockStore(AWS EBS Volu.. 더보기

728x90
반응형