본문 바로가기

728x90

전체 글

[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.. 더보기
[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.. 더보기
우분투에서 NFS Server를 설치하고 NFS 볼륨을 마운트하는 방법 우분투에서 NFS(Network File Service) Server를 설치하고 NFS 볼륨을 마운트하는 방법 테스트 환경 운영체제 버전 정보 $ lsb_release -d Description: Ubuntu 20.04.5 LTS NFS 서버 설치 NFS 서버 패키지 설치 sudo apt update sudo apt install -y nfs-kernel-server sudo systemctl --now enable nfs-server.service sudo systemctl status nfs-server $ sudo systemctl status nfs-server ● nfs-server.service - NFS server and services Loaded: loaded (/lib/systemd/.. 더보기
[kubernetes] 쿠버네티스 워크로드 - 워크로드 리소스 쿠버네티스 워크로드 - 워크로드 리소스 디플로이먼트(Deployment) : 모든 Pod가 필요시 교체 또는 상호 교체할 수 있는 경우, 클러스터의 스테이트리스 애플리케이션 워크로드를 관리하기에 적합 레플리카셋(ReplicaSet) - 레거시 리소스 레플리케이션컨트롤러(ReplicationController)를 대체 : 레플리카 파드 집합의 실행을 항상 안정적으로 유지하는 것이다. 이처럼 레플리카셋은 보통 명시된 동일 파드 개수에 대한 가용성을 보증하는 데 사용한다. 스테이트풀셋(StatefulSet) : 어떻게든 스테이트(state)를 추적하는 하나 이상의 파드를 동작하게 해준다. 예를 들면, 워크로드가 데이터를 지속적으로 기록하는 경우, 사용자는 Pod와 PersistentVolume을 연계하는 St.. 더보기
쿠버네티스 네임스페이스를 생성하고 확인하고 삭제하는 방법(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] 쿠버네티스 워크로드 - 파드(pods) 워크로드 - 파드(pods) myapp-pod-nginx.yaml 파일 작성 apiVersion: v1 kind: Pod metadata: name: myapp-pod-nginx labels: name: myapp-pod-nginx spec: containers: - name: myapp-pod-nginx image: nginx:latest resources: limits: memory: "128Mi" cpu: "500m" ports: - containerPort: 80 protocol: TCP 파드 생성 kubectl create -f myapp-pod-nginx.yaml $ kubectl create -f myapp-pod-nginx.yaml pod/myapp-pod-nginx created 파드 목.. 더보기
[kubernetes] 쿠버네티스 디플로이먼트 쿠버네티스 디플로이먼트(kubernetes deployment) 디플로이먼트(Deployment) 는 파드와 레플리카셋(ReplicaSet)에 대한 선언적 업데이트를 제공한다. 디플로이먼트에서 의도하는 상태 를 설명하고, 디플로이먼트 컨트롤러(Controller)는 현재 상태에서 의도하는 상태로 비율을 조정하며 변경한다. 새 레플리카셋을 생성하는 디플로이먼트를 정의하거나 기존 디플로이먼트를 제거하고, 모든 리소스를 새 디플로이먼트에 적용할 수 있다. 디플로이먼트 생성(kubectl create deployment) kubectl create deployment myapp --image=nginx $ kubectl create deployment myapp --image=nginx deployment.ap.. 더보기

728x90