Install k3s and get the kubeconfig

sudo apt update adduser eramax usermod -aG sudo eramax curl -sfL | K3S_KUBECONFIG_MODE=”644″ sh – kubectl get nodes cat /var/lib/rancher/k3s/server/node-token #Copy node token sudo kubectl create serviceaccount k8sadmin -n kube-system sudo kubectl create clusterrolebinding k8sadmin –clusterrole=cluster-admin –serviceaccount=kube-system:k8sadmin sudo kubectl -n kube-system describe secret $(sudo kubectl -n kube-system get secret | (grep k8sadmin || echo “$_”) | awk […]

Running CI tests in Kubernetes through Github Actions

Example  name: Main action on: [push] jobs: build: runs-on: ubuntu-latest timeout-minutes: 5 steps: – uses: actions/[email protected] – name: install k8s run: | curl -sfL | K3S_KUBECONFIG_MODE=777 sh – cat /etc/rancher/k3s/k3s.yaml mkdir -p ~/.kube cp /etc/rancher/k3s/k3s.yaml ~/.kube/config – name: example tests run: | kubectl cluster-info kubectl create deployment –image nginx my-nginx kubectl get po Source :

Deploy kubernetes cluster with multipass

multipass launch –name kms –cpus 1 –mem 1024M –disk 3G 16.04 multipass launch –name n1 –cpus 1 –mem 1024M –disk 3G 16.04 multipass launch –name n2 –cpus 1 –mem 1024M –disk 3G 16.04 multipass exec kms — /bin/bash -c “curl -sfL | K3S_KUBECONFIG_MODE=”644″ sh -” multipass shell kms sudo cat /var/lib/rancher/k3s/server/node-token # copy the token and ip […]

Install Kubernetes dashboard on MicroK8s on vps or barametal servers without proxy

kubectl apply -f kubectl create serviceaccount dashboard -n default kubectl create clusterrolebinding dashboard-admin -n default –clusterrole=cluster-admin –serviceaccount=default:dashboard kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath=”{.secrets[0].name}”) -o jsonpath=”{.data.token}” | base64 –decode kubectl -n kubernetes-dashboard edit service kubernetes-dashboard change the .spec.type to NodePort and add nodePort : 30100 Access the dashboard through : https://Server-IP:30100/#/login Use firefox instead of […]

How to redirect an incoming connection to a different IP address on a specific port using IPtables

Problem Redirect traffic incoming on a specific port to a different IP address / another server tl;dr Step 1: iptables -t nat -A PREROUTING -p tcp –dport 3124 -j DNAT –to-destination iptables -t nat -A POSTROUTING -j MASQUERADE Solution Below will show you how to redirect port 3124 on one machine to port 3000 on a different […]

Cockpit, web-based interface for your servers

Cockpit makes GNU/Linux discoverable. See your server in a web browser and perform system tasks with a mouse. It’s easy to start containers, administer storage, configure networks, and inspect logs. sudo apt -y install cockpit sudo systemctl start cockpit.socket sudo systemctl enable cockpit.socket https://ip-address:9090   Source:

How to Install VMware Workstation on Arch Linux / Manjaro

Step 1: Install yay AUR helper Start by installing a smart AUR helper called yay. yay – Best AUR Helper for Arch Linux / Manjaro. Step 2: Install Dependencies Install all required dependencies for running VMware Workstation on Arch Linux / Manjaro. sudo pacman -S fuse2 gtkmm linux-headers pcsclite libcanberra The other package needed by the –console installer is ncurses5-compat-libs. This […]

How to Set Up Kubernetes on an Ubuntu VPS

Do you want to learn how to set up Kubernetes on Ubuntu? Keep reading this article! Kubernetes is a powerful open-source platform for automatic scaling, deployment, and management of containerized systems. It’s a robust application that groups containers into logic units making it easy to discover and manage them across multiple clusters of hosts. Kubernetes has many pieces […]

1 2 3