Minikube on MacOS

Installation of Minikube on MacOS Minikube has emerged the easiest drop-in replacement for Docker Desktop. minikube is used to run a Kubernetes cluster on local environment. But it also runs a docker daemon that can be used to run containers. On macOS, minikube runs on a lot of virtualization technologies, but hyperkit is the easiest to use. Install Hyperkit and Minikube brew install hyperkit brew install minikube Install Docker CLI brew install docker brew install docker-compose Start minikube minikube start Tell Docker CLI to talk to minikube’s VM eval $(minikube docker-env) Save IP to a Hostname echo "`minikube ip` docker....

Minikube - SSH into running container

SSH into a running Container on Minikube If you only need to forward some exposed container ports out of Minikube so they are accessible on your host machine, you can run an SSH tunnel. This is useful if you are using Minikube as a Docker Desktop replacement and aren’t running K8s services. For example, forward traffic on exposed container port 8000 to the host machine on port 8000: ssh -g -L 8000:localhost:8000 -N -i ~/....

Kubernetes - create a cluster with one line

Create a Kubernetes managed Cluster on Google GCP with one line of code !!Be Careful: running ths may incur costs on your project - make sure to delete the resources when finished!! prerequisits A project with Kubernetes API enabled GCP CLI installed An environment variable CLUSTER_NAME defined with the name of the cluster Compute/Region set in project configuration to your preferred Region default VPC in place. gcloud config set compute/zone <preferred-region> PROJECT_ID=$(gcloud config get-value project) CLUSTER_NAME=<cluster-name> The Code : gcloud beta container clusters create $CLUSTER_NAME \ --cluster-version=latest \ --machine-type=e2-standard-4 \ --enable-autoscaling \ --min-nodes=1 \ --max-nodes=3 \ --num-nodes=1 Get Credentials gcloud container sclusters get-credentials $CLUSTER_NAME Check pods...

kubernetes nodes setup

Start scripts for kubernetes native nodes These statup scripts require a UBUNTU 20.04 LTS base image! If you want to use Ubuntun 22.04 LTS, exchange for the kubenretes part ‘xenial’ with ‘jummy’. Script for the master node on AWS #!/bin/bash # Load necessary kernel modules for containerd cat << EOF | sudo tee /etc/modules-load.d/containerd.conf overlay br_netfilter EOF sudo modprobe overlay sudo modprobe br_netfilter # Configure kernel networking requirements for Kubernetes cat << EOF | sudo tee /etc/sysctl....