gasraer.blogg.se

Install kubernetes cluster multi master
Install kubernetes cluster multi master









install kubernetes cluster multi master
  1. #Install kubernetes cluster multi master install
  2. #Install kubernetes cluster multi master update

Remove taint from node2: $ kubectl taint nodes rpi-02 k3s-controlplane=true:NoExecute-Īnd remove from node3: $ kubectl taint nodes rpi-03 k3s-controlplane=true:NoExecute.

install kubernetes cluster multi master

Rpi-03 Ready master 25s v1.18.4+k3s1 Untaint NodesĪs mentioned, all 3 nodes run with NoExecute taints, and now we would like to remove them from node2 and node3 as a demonstration, if you would like to do that.You can read more up about taints from the documentationĭescribe the nodes to view the taints: $ kubectl describe nodes | grep Taints When we list our kubernetes nodes: $ kubectl get nodesĭo the same for node 2 and node 3, once they have been provisioned, you should see the following: $ kubectl get nodes $ curl -sfL | INSTALL_K3S_EXEC="-write-kubeconfig-mode 644 -token secret-01010101-xabcdefx -tls-san -node-taint k3s-controlplane=true:NoExecute" sh -s - server kubeconfig will be available at: /etc/rancher/k3s/k3s.yaml You will notice that I am also using -node-taint k3s-controlplane=true:NoExecute" on all 3 nodes, you can remove that, but I also want to show how you can remove the taints manually from node2 and node3 after the deployment.

#Install kubernetes cluster multi master install

On our first node, install k3s and use the arguments as you prefer, but the important one is to point our database using -datastore-endpoint.

#Install kubernetes cluster multi master update

> UPDATE user SET plugin='' WHERE User='rancher' Įdit sudo vim /etc/mysql//50-server.cnf and comment out bind-address so that mysql listens on all interfaces, then restart: $ sudo /etc/init.d/mysql restart > GRANT ALL on k3s.* TO FLUSH PRIVILEGES' Now you can auth with your password: $ mysql -u root -pĬreate the k3s database, the rancher user that will own the database and set a password: > CREATE database k3s

install kubernetes cluster multi master

> UPDATE user SET plugin='' WHERE User='root' Then enable the plugin for socket authentication: $ sudo mysql -u root The initial setup of our database for kubernetes: $ sudo mysql_secure_password On our database node, i'm installing mariadb server 10.3: $ sudo apt install mariadb-server-10.3 -y In this post we will setup a 3 node multi-master kubernetes cluster using k3s which is backed with mysql.I will be installing mariadb on one of my nodes, but if you want to get mysql or mariadb running on docker, you can check out mysql on dockerhub.











Install kubernetes cluster multi master