Last active
January 9, 2026 17:07
-
-
Save inspire12/03fdf1754f95f23ba7fca869d177d508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ec2 설치 | |
| curl -sfL https://get.k3s.io | sh -s - --docker --disable traefik --write-kubeconfig-mode 644 | |
| mkdir -p $HOME/.kube | |
| sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config | |
| sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
| # ec2 포트포워딩 추가 | |
| # ec2 kubeconfig 복사 | |
| sudo cat /etc/rancher/k3s/k3s.yaml > /home/ubuntu/k3s-embedded.yaml | |
| sudo chown ubuntu:ubuntu /home/ubuntu/k3s-embedded.yaml | |
| # local | |
| scp -i "/Users/yeonghakseo/Documents/workspace/upstage-aws-secret.pem" \ | |
| ubuntu@{ec2 ip}:/home/ubuntu/k3s-embedded.yaml \ | |
| ~/.kube/k3s-gangwon-ec2.yaml | |
| # local kubeconfig ec2 k3s 를 바라보도록 정정 | |
| export KUBECONFIG=~/.kube/k3s-gangwon-ec2.yaml | |
| kubectl cluster-info | |
| kubectl get nodes | |
| # local 다른 터미널 터널링 mac 버전) | |
| # ssh -i {.pem} \ | |
| # -N \ | |
| # -o ExitOnForwardFailure=yes \ | |
| # -v \ | |
| # -L 6443:127.0.0.1:6443 \ | |
| # ubuntu@{ec2 ip} | |
| ssh -i {.pem} \ | |
| -N \ | |
| -o ExitOnForwardFailure=yes \ | |
| -v \ | |
| -L 64430:127.0.0.1:6443 \ | |
| ubuntu@{ec2 ip} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment