Created
September 3, 2020 13:21
-
-
Save l1ahim/9a966ff541de0362e61374abb04abc77 to your computer and use it in GitHub Desktop.
Revisions
-
l1ahim renamed this gist
Sep 3, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
l1ahim created this gist
Sep 3, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ # API server: nodes should be able to reach k3s server tcp port 6443 # flannel vxlan: udp port 8472 for nodes to communicate (server and agents) # metrics server: it collects resource metrics from kubelets and exposes them in k8s api server through metrics api. tcp port 10250 # https://rancher.com/docs/k3s/latest/en/installation/install-options/ # run the installation script curl -sfL https://get.k3s.io | sh - # create k3s group and add user to avoid using always sudo sudo groupadd k3s sudo usermod -aG k3s $USER sudo chown root:k3s /etc/rancher/k3s/k3s.yaml sudo chmod 740 /etc/rancher/k3s/k3s.yaml # node configuration using the agent # the token can be found on control server at: /var/lib/rancher/k3s/server/node-token curl -sfL https://get.k3s.io | K3S_URL=https://k3sserver:6443 K3S_TOKEN=mynodetoken sh - # create test pod cat <<EOF > podtemplate.yaml apiVersion: v1 kind: Pod metadata: name: cowfortune spec: containers: - name: funbox-cow image: wernight/funbox command: ["fortune | cowsay"] EOF