AWS kubectl Installation and Commands
Install the Required Libraries on Windows AWS Configure (AWS API KEY) Configure AWS kubeconfig for EKS Log in to AWS ECR from a shell script Kubectl Commands Ho
GGAMI
Contents
aws configure
Access key ID 입력
Secret access key 입력
ap-northeast-2 입력
None 입력
aws configure list
aws configure --profile testUser
aws s3 ls --profile testUseraws eks update-kubeconfig --name svc-seoul-v2 --alias svc-seoul-v2 --region ap-northeast-2aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 123456789.dkr.ecr.ap-northeast-2.amazonaws.com# 네임스페이스 생성
kubectl create namespace manager
# pod 검색
kubectl get pod -A
# port forward
kubectl port-forward services/postgresql 5432:5432 -n manager
# apply
kubectl apply -f ingress.yml --namespace=manager
# ctx 변경
kubectx dev-seoul-v2
kubectx -cHowever, since I use k9s rather than kubectl commands, I don't end up using the commands much.
kubectl config unset users.gke_project_zone_name
kubectl config unset contexts.aws_cluster1-kubernetes
kubectl config unset clusters.foobar-bazThis is actually more important than you might think: these commands remove ctx entries saved in the config. (Use them when, for example, a ctx address changes.)
:deploy 삭제
:service 삭제
:pods 를 삭제 해야지만, 컨테이너가 되살아나지 않는다.This seems obvious now... (I didn't know that when I wrote this down in my notepad.)
terraform init
terraform apply
terraform apply -f ~~~~
terraform destroy -approve
terraform refresh