GithubHelp home page GithubHelp logo

k3s's Introduction

k3s

3 ways to run k3s

  1. Command line Installation
# Non-HA use SQLite as database
curl -sfL https://get.k3s.io | sh -

# see Token, copy to your clipboard
cat /var/lib/rancher/k3s/server/node-token

# Worker node, you can paste Token from the clipboard
curl -sfL https://get.k3s.io | K3S_URL=https://<ip-server>:6443 K3S_TOKEN=<server-token> sh - 

k3s kubectl get nodes

# HA configuration use Etcd
# master node#1
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --cluster-init --node-ip <ip-this-node> --node-external-ip <ip-this-node>" sh -s -
kubectl get nodes
cat /var/lib/rancher/k3s/server/token

# master node#2
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --server https://<ip-master#1>:6443 --node-ip <ip-this-node> --node-external-ip <ip-this-node>" K3S_TOKEN=<token> K3S_NODE_NAME=node2 sh -
kubectl get node

# master node#3
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --server https://<ip-master#1>:6443 --node-ip <ip-this-node> --node-external-ip <ip-this-node>" K3S_TOKEN=<token> K3S_NODE_NAME=node3 sh -
kubectl get node

# worker node
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --agent https://<ip-master#1>:6443 --node-ip <ip-this-node> --node-external-ip <ip-this-node>" K3S_TOKEN=<token> K3S_NODE_NAME=agent1 sh -
  1. K3D
# create single-node cluster
k3d cluster create
k3d cluster list
kubectl get node
kubectl get pod
k3d cluster delete

# create multi-node cluster
k3d cluster create --servers 3 --agents 1
k3d cluster list

kubectl get node
kubectl get pod

# see docker process

docker ps
  1. Rancher Desktop, see https://rancherdesktop.io/

k3s's People

Contributors

manote101 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.