Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s #32

Open
GunSik2 opened this issue Oct 6, 2021 · 0 comments
Open

k3s #32

GunSik2 opened this issue Oct 6, 2021 · 0 comments

Comments

@GunSik2
Copy link
Owner

GunSik2 commented Oct 6, 2021

k3s

k3s server 설치

최신 안정 버전 설치

curl -sfL https://get.k3s.io | sh -

버전 지정 설치

curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.5+k3s2  sh -

클러스터 접속 설정 및 테스트

# vi ~/.bashrc
export KUBECONFIG=/etc/rancher/k3s/k3s.yam

# kubectl get pods -A
# kubectl get nodes -A
NAME    STATUS   ROLES                  AGE   VERSION
rpi3s   Ready    control-plane,master   20m   v1.21.5+k3s2

k3s agent 설치

Server 토큰 확인

# sudo cat /var/lib/rancher/k3s/server/node-token
K10a77642527aa799d87fb8f1694063ec6ec00908a0ee4e202fce2565947aa976dc::server:4721df4e521bd73f215eae4575c0bbee

Agent 노드 실행(Raseberry Pi)

curl -sfL https://get.k3s.io |   INSTALL_K3S_VERSION=v1.21.5+k3s2 \ 
K3S_URL=https://192.168.0.22:6443 \
K3S_TOKEN=K10a77642527aa799d87fb8f1694063ec6ec00908a0ee4e202fce2565947aa976dc::server:4721df4e521bd73f215eae4575c0bbee \
sh -

Agent 노드 실행(Jetson)

  • k3s 기본 containerd 대신 docker 사용하도록 설정 (--docker)
curl -sfL https://get.k3s.io |   INSTALL_K3S_VERSION=v1.21.5+k3s2 \ 
INSTALL_K3S_EXEC="--docker" \
K3S_URL=https://192.168.0.22:6443 \
K3S_TOKEN=K10a77642527aa799d87fb8f1694063ec6ec00908a0ee4e202fce2565947aa976dc::server:4721df4e521bd73f215eae4575c0bbee \
sh -

삭제

Server 삭제

/usr/local/bin/k3s-uninstall.sh  

Agent 삭제

/usr/local/bin/k3s-agent-uninstall.sh

참고자료

https://rancher.com/docs/k3s/latest/en/
https://github.com/k3s-io/k3s/blob/master/README.md
https://rancher.com/docs/k3s/latest/en/advanced/#configuring-containerd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant