πŸ“Œ 1. Podλž€ λ¬΄μ—‡μΈκ°€μš”?

PodλŠ” Kubernetesμ—μ„œ κ°€μž₯ μž‘μ€ 배포 λ‹¨μœ„λ‘œ, ν•˜λ‚˜ μ΄μƒμ˜ μ»¨ν…Œμ΄λ„ˆλ₯Ό κ·Έλ£Ήν™”ν•œ 논리적 ν˜ΈμŠ€νŒ… λ‹¨μœ„μž…λ‹ˆλ‹€.


πŸ› οΈ 2. μ‹€μŠ΅ 예제: κ°„λ‹¨ν•œ Nginx Pod 생성

πŸ§ͺ 예제 1: nginx Pod μƒμ„±ν•˜κΈ°

  1. Pod μ •μ˜ 파일 (nginx-pod.yaml) μž‘μ„±:
apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
  labels:
    app: nginx
spec:
  containers:
    - name: nginx-container
      image: nginx:latest
      ports:
        - containerPort: 80

  1. Pod 생성:
kubectl apply -f nginx-pod.yaml

  1. Pod μƒνƒœ 확인:
kubectl get pod nginx-pod

  1. Pod 상세 정보 확인:
kubectl describe pod nginx-pod

  1. Pod μ•ˆμ— 듀어가보기 (μ…Έ 접속):
kubectl exec -it nginx-pod -- /bin/bash

  1. Pod μ‚­μ œ:
kubectl delete -f nginx-pod.yaml