쿠버네티스

    [kodekloud] 02 Scheduling : Node Affinity 풀이

    Q1. How many Labels exist on node node01? Q2.What is the value set to the label key beta.kubernetes.io/arch on node01? 1번 명령어를 통해 value가 amd64임을 알 수 있음 beta.kubernetes.io/arch=amd64 Q3. Apply a label color=blue to node node01 k label node node01 color=blue Q4. Create a new deployment named blue with the nginx image and 3 replicas. k create deployment blue --image=nginx --replicas=3 Q5. Which nod..

    [kodekloud] 02 Scheduling : Taints and Tolerations 풀이

    Q1. How many nodes exist on the system? alias k=kubectl; k get nodes Q2.Do any taints exist on node01 node? kubectl describe node node01 | grep -i taints # i 옵션 : 특정 문자열을 대소문자 구분 없이 검색 Q3. Create a taint on node01 with key of spray, value of mortein and effect of NoSchedule k taint node node01 spray=mortein:NoSchedule #kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFE..

    [kodekloud] 02 Scheduling : Labels and Selectors 풀이

    Q1. We have deployed a number of PODs. They are labelled with tier, env and bu. How many PODs exist in the dev environment (env)? k get pods --selector env=dev # env가 dev인 파드 불러오기 k get pods --selector env=dev --no-headers | wc -l #개수 세기 Q2. How many PODs are in the finance business unit (bu)? k get pods --selector bu=finance --no-headers | wc -l '''--no-headers를 하지 않으면 헤더까지 카운팅 되기 때문에 제외해야함''' ..

    [kodekloud] 01 Core Concepts : Imperative-Commands 풀이

    Q1. Deploy a pod named nginx-pod using the nginx:alpine image. k run nginx-pod --image=nginx:alpine Q2. 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 Q3. Create a service redis-service to expose the redis application within the cluster on port 6379. 명령어 예시 공식문서 kubectl expose (-f FILENAME | TYPE NAME) [--port=por..