Exercise 2.4: Multi-Container Pods

  1. 이전 실습에서 생성한 Pod 삭제

    kubectl delete pod nginx
  2. Pod 생성

    cat <<EOF | kubectl apply -f -
    apiVersion: v1
    kind: Pod
    metadata:
      name: nginx
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
      - name: fdlogger
        image: fluent/fluentd
    EOF
  3. Pod 상태 확인

    kubectl get pod nginx
  4. Pod 상세 내용 확인

    kubectl describe pod nginx
  5. Pod 삭제

    kubectl delete pod nginx

Last updated