Deploying kubernetes dashboard

Preparation 1. Deploy metrics server First, we need to deploy metrics server before deploying kubernetes dashboard 1 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml if you have a problem that metrics-server’s pod not running, probably because tls issue, so add --kubelet-insecure-tls on args section of deployment, then rollout restart it. Kubernetes dashboard 2. Deploy kubernetes dashboard 1 kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml 3. Make user credential Service account 1 2 3 4 5 6 7 kubectl apply -f - << EOF apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard EOF Cluster Role Binding 1 2 3 4 5 6 7 8 9 10 11 12 13 14 kubectl apply -f - << EOF apiVersion: rbac....

January 15, 2024 · 1 min · 182 words · Luqinthar Sudarsono

Wordpress kubernetes with external database and bind9

Setup Database server 1. Install mariadb or mysql 1 apt install mysql-server -y 2. Configure mysql-server to bind 0.0.0.0 1 vim /etc/mysql/mysql.conf.d/mysqld.cnf => bind-address to 0.0.0.0 3. Create new user for wordpress 1 2 3 mysql -u root CREATE USER 'wp-user'@'%' IDENTIFIED BY '<YOUR_PASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO 'wp-user'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'wp-user'@'%'; Setup bind9 4. Install bind9 1 apt install bind9 5....

January 9, 2024 · 3 min · 523 words · Luqinthar Sudarsono

Deploying kubernetes using kubespray with HAProxy and Keepalived

Topology: Loadbalancer Haproxy with keepalived as kube api server for the cluster, which provide High availability. The Loadbalancer machine gets virtual IP from keepalived to keep kube api server endpoints always availabilty, then the haproxy allow us to provide loadbalancing for each master node api server. Loadbalancer preparation 1. Setup haproxy on loadbalancer node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 # do it on LB1 and LB2 # Update package and install haproxy apt update apt install haproxy -y # edit haproxy....

January 9, 2024 · 3 min · 611 words · Luqinthar Sudarsono

Deploying kubernetes with kubespray

Environtment: This environment just for testing and not for HA (High Availability) method Node IP Address Note lq-deployer 10.13.13.13 kubespray deployer lq-master 10.13.13.10 control plane lq-worker 10.13.13.20 worker Preparation 1. Make sure all node has pubkey of deployer 1 2 3 4 5 # On deployer ssh key-gen # and other node input the deployer pubkey into .ssh/authorized_keys nano .ssh/authorized_keys 2. Setting up ansible 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # Do it on deployer node nano /etc/ansible/ansible....

January 9, 2024 · 2 min · 390 words · Luqinthar Sudarsono

Kubernetes Installation

Do it on all nodes 1. Prepare module and sysconfig 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf overlay br_netfilter EOF sudo modprobe overlay sudo modprobe br_netfilter # sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.ipv4.ip_forward = 1 EOF # Apply sysctl params without reboot sudo sysctl --system 2....

January 9, 2024 · 2 min · 370 words · Luqinthar Sudarsono