#!/bin/bash server(){ # install from binary # https://github.com/k3s-io/k3s/releases/tag/v1.22.3+k3s1 k3s server \ --write-kubeconfig-mode "0644" \ --https-listen-port "16643" \ --advertise-port "16643" \ --lb-server-port "16644" \ --advertise-address "146.56.147.12" \ --node-name "master-s0" \ --bind-address "0.0.0.0" \ --cluster-cidr "10.74.0.0/16" \ --service-cidr "10.100.0.0/16" \ --cluster-dns "10.100.0.10" \ --service-node-port-range "19000-19500" \ --cluster-domain "wdd.io" \ --default-local-storage-path "/data/k3s/" \ --no-deploy "metrics-server" \ --no-deploy "coredns" \ --no-deploy "servicelb" \ --node-label "location=seoul" \ --disable-network-policy \ --docker \ --agent-token "woshinibaba" \ --cluster-init # install by script cat >/root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml</root/k3s-install/k3s-config.yaml<