The idea is to create a quick repeatable setup that will possibly be automated.
- Local storage
- Internal registry
- Ingress
- Use kube as container build environment (Podman)
- Local DNS resolution
- Auto refresh inner loop
- Fast start templates
- Knative - optional
- FaaS - optional
- Pipelines - optional
- Operators - optional
- Service Mesh - optional
- kubectl
- kubectx - switch context between kubernetes instances
- kubens - easily manage namespaces
- watch
- tldr
- jq
Installation instructions: https://minikube.sigs.k8s.io/docs/start/
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
This depends on your system capabilities.
- Driver leave as default
- Version leave as default (latest)
- CPU: 4
- Memory: 20 GB
- Disk Size: 50GB
- Container runtime: cri-o
See how many cores you have available
# Linux
lscpu | grep CPU(s)
Set CPUs
minikube config set cpus 4
Determine available memory
#Linux
grep MemTotal /proc/meminfo
Set Memory
minikube config set memory 20g
Set Disk Size
minikube config set disk-size 50g
Set container tuneime
minikube config set container-runtime cri-o
Start the cluster
minikube start
Verify the cluster is working
kubectl get nodes
minikube status
- admin console: Dashboard
- Internal registry
- ingress
- cluster dns: Simplifies domain name based access to cluster
- storage
See the list of addons and their status
minikube addons list
minikube addons enable dashboard
# Optional
minikube addons enable metrics-server
Use the dashboard
minikube dashboard --url
minikube addons enable registry
https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/
- Note that the cluster IP changes if you create a new one Steps:
- Enable the ingress-dns add-on
- Get the cluster IP
- Create the config file
minikube addons enable ingress
minikube addons enable ingress-dns
# Get Kube IP
minikube ip
Linux: Update resolv configuration
- Find the network for your cluster: ifconfig iprange should match minikube ip range
- Create resolvd entry for that
# Identify network link
ifconfig
# set search - temporary
sudo systemd-resolve --interface virbr1 --set-dns $(minikube ip) --set-domain test
echo "server=/test/$(minikube ip)" >/etc/NetworkManager/dnsmasq.d/minikube.conf
systemctl restart NetworkManager.service
Permanent fix create file: /etc/systemd/network/minikube.network
[Match]
Name=virbr1
[Network]
DNS=192.168.39.2
Domains=test
MacOS Create a file in /etc/resolver/minikube-profilename-test
domain test
nameserver 192.168.99.169
search_order 1
timeout 5
Replace 192.168.99.169 with your minikube ip and profilename is the name of the minikube profile for the corresponding ip address
minikube podman-env
eval $(minikube -p minikube podman-env)
minikube podman-env
eval $(minikube -p minikube docker-env)
- kubectl
- kubectx - switch context between kubernetes instances
- kubens - easily manage namespaces