0. EKS Cluster 생성 후, 기본 세팅
$ aws eks update-kubeconfig --region {region-code} --name {my-cluster}
* eksctl 설치
# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH
curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
# (Optional) Verify checksum
curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check
tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
sudo mv /tmp/eksctl /usr/local/bin
1. pod 생성하기
# nginx 파드 생성하기
$ kubectl run nginx --image nginx:latest
# 생성된 파드 조회하기
$ kubectl get pods
# nginx 파드의 상세정보 보기
$ kubectl describe pod nginx
# nginx 파드의 상태를 output.yaml 파일에 저장하기
$ kubectl get pod nginx -o yaml > pod.yaml
# 생성된 YAML 파일 조회
$ cat pod.yaml
2. namespace 설정하기
# namespace 생성하기
$ kubectl create namespace ywopsx
namespace default 로 생성된 pod.yaml 의 namespace 를 ywopsx 로 수정 후, apply
# pod.yaml 수정 후, apply
$ kubectl apply -f pod.yaml
# ywopsx 네임스페이스 pod 조회
$ kubectl get pod -n ywopsx