Advertisement
andrejsstepanovs

install k3s

Nov 6th, 2020 (edited)
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. export INSTALL_K3S_EXEC="server --no-deploy traefik"
  2.  
  3. curl -sfL https://get.k3s.io | sh -
  4.  
  5. # config file is here:
  6. mkdir $HOME/.kube
  7. cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
  8. cat /etc/rancher/k3s/k3s.yaml
  9.  
  10. # replace your ip. If its 22.22.22.22 then:
  11. sed 's/127.0.0.1/22.22.22.22/g' /etc/rancher/k3s/k3s.yaml
  12.  
  13.  
  14. # to build in access from other server
  15. curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--tls-san x.x.x.x" sh -s -
  16.  
  17. k3d create -p 6550 --workers 2 -x --tls-san="1.2.3.4" -x --tls-san="4.3.2.1"
  18.  
  19. # if no traefik was used then you dont have ingress controller. install nginx
  20.  
  21. kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/baremetal/deploy.yaml
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement