Kubernetes/CKA

Scheduling - Static PODs

Static Pod이란?Static Pod은 Kubernetes API 서버와 상관없이 Kubelet이 직접 관리하는 파드다./etc/kubernetes/manifests/ 경로에서 YAML 파일을 통해 정의됨 Q) How many static pods exist in this cluster in all namespaces?A) 4controlplane ~ ✖ cd /etc/kubernetes/manifests/controlplane /etc/kubernetes/manifests ➜ ls -alttotal 28drwxrwxr-x 1 root root 4096 Mar 17 02:01 .-rw------- 1 root root 2559 Mar 17 02:01 etcd.yaml-rw------- 1 root..

2025.03.17 게시됨

Kubernetes/CKA

Scheduling - Node Affinity

선호하는 노드를 설정하는 방법으로, nodeSelector 보다 확장된 Label Selector 기능을 지원한다.types - requiredDuringSchedulingIgnoredDuringExecution / preferredDuringSchedulingIgnoredDuringExecutionaffinity > nodeAffinity > ${type} > nodeSelectorTerms > matchExpression > {key/{values}/operator} Q) How many labels exists on node01?$ k describe no node01 | grep -i -A 5 labelLabels: beta.kubernetes.io/arch=amd64 ..

2025.01.26 게시됨

Kubernetes/CKA

Scheduling - Taints and Tolerations

$ k apply -f bee.yaml pod/bee created​taint : 노드마다 설정가능. 설정한 노드에는 pod이 스케줄되지 않음 (NoSchedule, PreferNoSchedule, NoExecute)key=value:NoSchedule means key=value가 아닌 pod들은 schedule될 수 없음toleration : pod에 설정, key, value, effect, operator을 지정해서 어떤 taint를 무시할 지 정할 수 있음operator이 Equal이면 value설정해야함 (key value 둘 다 matching 필요), Exists면 key만 있으면 됨 $ k get poNAME READY STATUS RESTARTS AGEmosqui..

2025.01.26 게시됨

Kubernetes/CKA

Core Concepts - Imperative Commands

Q) Deploy a pod named nginx-pod using the nginx:alpine image$ k run nginx-pod --image=nginx:alpinepod/nginx-pod created Q) Deploy a redis pod using the redis:alpine image with the labels set to tier=db.$ k run redis --image=redis:alpine \> --labels="tier=db"pod/redis created Q) Create a service redis-service to expose the redis application within the cluster on port 6379.$ k expose po redis --po..

2025.01.18 게시됨

Core Concepts - Services 포스팅 썸네일 이미지

Kubernetes/CKA

Core Concepts - Services

Q) What is the Type of kubernetes Service?$ k get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEkubernetes ClusterIP 10.43.0.1 443/TCP 8m11sA) ClusterIPClusterIP: 클러스터 내부에서만 접근 가능한 기본 서비스 (기본값). NodePort: 클러스터 외부에서 각 노드의 고정 포트로 접근 가능. LoadBalancer: 클라우드 제공자의 로드 밸런서를 통해 외부에서 접근 가능. ExternalName: DNS 이름을 클러스터 외부 서비스에 매핑 (외부 서비스와의 연동). Q) What is the targetPor..

2025.01.16 게시됨