전체 글 (220) 썸네일형 리스트형 [Kubernetes]Kubernetes Health checks using API The Kubernetes API server provides 2 API endpoints (livez and readyz) to indicate the current status of the API server. There are 2 ways to health check 1. Health check with endpoint Get cluster endpoint kubectl cluster-info >>> Kubernetes control plane is running at https://10.50.103.133:8443 CoreDNS is running at https://10.50.103.133:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/pr.. [Python]문자열 함수 정리 사용하는 함수 count() index() find() join() strip() upper() lower() split() replace() 예문 data = "Kubernetes is an open source container orchestration engine for automating deployment, " \\ "scaling, and management of containerized applications." data2 = "123456789" data_join = '|' data_strip = " data for strip " data2_strip = " 7777766665555444(data for strip)333322221111 " data_split = "9,8,7,6,5,4,3.. [Kubernetes]Dynamic provisioning failure in Kubernetes Problem Dynamic provisioning시 provisioner pod에서 아래와 같은 에러 메시지와 함께 PVC가 pending 상태가 된다. “unexpected error getting claim reference: selfLink was empty, can't make reference” k logs nfs-pod-provisioner-5948549f8c-46h4h I0330 01:31:27.061484 1 controller.go:987] provision "default/test-dynamic-nfs-pvc" class "joins-nfs-storageclass": started E0330 01:31:27.068286 1 controller.go:1004] provision "def.. [Kubernetes]Dynamic Provisioning with NFS in Kubernetes Purpose PVC를 생성할 때 PV 가 자동으로 생성되는 Dynamic Provisioning 을 NFS 기반으로 운영 1. Create Service Account - API 인증 구성 provisioner가 사용할 Service Account(nfs-pod-provisioner-sa)를 만들어 ClusterRole을 통해 pv와 pvc에 [get, list, watch, create, delete] 권한을 가질 수 있도록 API 인증을 구성 kind: ServiceAccount apiVersion: v1 metadata: name: nfs-pod-provisioner-sa --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadat.. [Kubernetes]How to create pv and pvc in kubernetes 아래 템플릿을 사용하여 hostpath pv,pvc 를 생성할 수 있다. PersistentVolume Template pv-hostpath.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-hostpath spec: capacity: storage: 2Gi #1 스토리지 용량 volumeMode: Filesystem #2 accessModes: #3 - ReadWriteOnce storageClassName: manual #4 persistentVolumeReclaimPolicy: Delete #5 hostPath: #6 path: /data/storage/test-pv [dewble@instance-1 volume]$ kubectl -f a.. [Kubernetes]What are PV and PVC in Kubernetes? Concept PersistentVolume A piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. 퍼시스턴트볼륨 (PV)은 관리자가 프로비저닝 하거나 스토리지 클래스를 사용하여 동적으로 프로비저닝 한 클러스터의 스토리지이다. 노드가 클러스터 리소스인 것처럼 PV는 클러스터 리소스이다. PV는 Volumes와 같은 볼륨 플러그인이지만, PV를 사용하는 개별 파드와는 별개의 라이프사이클을 가진다. 이 API 오브젝트는 NFS, iSCSI 또는 클라우드 공급자별 스토리지 시스템 등 스토리지 구현에 대한 세부 정보를 담아낸다. Pers.. [Kubernetes]kubectl command 자동 완성 kubectl cheat sheet setting bashrc 혹은 profile 설정이 가능 곳에 아래 내용을 입력하고 적용한다. # for bash source [Kubernetes]What is Kubernetes Horizontal Pod Autoscaler (HPA) 쿠버네티스에서, HorizontalPodAutoscaler는 워크로드 리소스(예: 디플로이먼트 또는 스테이트풀셋)를 자동으로 업데이트하며, 워크로드의 크기를 수요에 맞게 자동으로 스케일링하는 것을 목표로 한다. → 부하 증가에 대해 파드를 더 배치하는 것을 뜻한다. 부하량이 줄어들고, 파드의 수가 최소 설정값 이상인 경우 HPA는 스케일 다운을 지시한다. 알고리즘 원하는 레플리카 수 = ceil[현재 레플리카 수 * ( 현재 메트릭 값 / 원하는 메트릭 값 )] 예시 - 1 현재 메트릭 값 200m, 원하는 값 100m인 경우 200/100 = 2 레플리카 수는 2배가 된다. 예시 - 2 현재 메트릭 값 50m, 원하는 값 100m인 경우 50/100 = 0.5 레플리카 수는 1/2배가 된다. yaml .. 이전 1 ··· 16 17 18 19 20 21 22 ··· 28 다음