Environtment

6 Virtual Machine

  • loadbalancer = 10.10.10.59/24
  • cp1 = 10.10.10.160/24
  • cp2 = 10.10.10.182/24
  • cp3 = 10.10.10.54/24
  • worker1 = 10.10.10.69/24
  • worker2 = 10.10.10.165/24
  • worker3 = 10.10.10.62/24

K3S Component

  • kubernetes
  • containerd
  • runc
  • calico
  • coredns
  • metric-server
  • traefik
  • helm-controller
  • local-path-provisioner
  • etcd

Topology

image.png

Prequisite Install

Add New User

useradd -m -s /bin/bash rafiryd
passwd rafiryd

echo "rafiryd ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/rafiryd

Set Hostname

// on node loadbalancer
hostnamectl set-hostname loadbalancer

// on node cp1
hostnamectl set-hostname cp1

// on node cp2
hostnamectl set-hostname cp2

// on node cp3
hostnamectl set-hostname cp3

// on node worker1
hostnamectl set-hostname worker1

// on node worker2
hostnamectl set-hostname worker2

// on node worker3
hostnamectl set-hostname worker3

Set Timezone

timedatectl set-timezone Asia/Jakarta

Set IP Static

Note : Skip this step if you use cloud-init

setting netplan

vim /etc/netplan/00-installer-config.yaml

edit

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens160:
      dhcp4: false
      addresses: [10.10.10.x/24]
      routes:
        - to: default
          via: 10.10.10.254
      nameservers:
        addresses: [1.1.1.1,8.8.8.8]
  version: 2

Update & Upgrade

apt update -y && apt upgrade -y

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *