brew install minikube
# install docker cli only
brew install docker
brew install docker-compose
brew install hyperkit
minikube config set driver hyperkit
minikube config set container-runtime containerd
minikube config set memory 8192
minikube config set cpus 2
minikube start
minikube start \
--driver=hyperkit \
--container-runtime=docker \
--cpus='2' --memory='4g' \
--disk-size=30Gi \
--network-plugin=cni --cni calico \
--kubernetes-version=v1.24.3
Install kvm on Linux Mint, kvm on Ubuntu
minikube start \
--driver=kvm \
--container-runtime=docker \
--cpus='4' --memory='8g' \
--disk-size=30Gi \
--network-plugin=cni --cni calico \
--kubernetes-version=v1.24.3
Point your shell to minikube's docker-daemon
eval $(minikube -p minikube docker-env)
Setup local-path-provisioner
:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.22/deploy/local-path-storage.yaml
Verify setup by spinning up a docker-compose stack
git clone https://github.com/docker/awesome-compose.git
cd awesome-compose/nginx-flask-mongo
docker-compose up
$ minikube ip
192.168.99.101
$ curl 192.168.99.101:80
Hello from the MongoDB client!
Example repo: https://github.com/quangthe/magnolia-bootstrap
eval $(minikube docker-env)
# set ARGs
#
docker build \
--build-arg GIT_COMMIT=$(git rev-parse HEAD) \
--build-arg APP_VERSION=v1 \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t magnolia-bootstrap .
# use --image-pull-policy=Never to force k8s lookup local imge
kubectl run test --image=magnolia-bootstrap --image-pull-policy=Never -it --rm --restart=Never -- version
{"Version":"dev","Commit":"e694081dec6fe203ec06c447030b1ec94d6e68a0","Date":"2022-07-05T03:07:26Z"}
pod "test" deleted
minikube addons enable metrics-server
minikube addons enable registry
curl $(minikube ip):5000/v2/_catalog
{"repositories":[]}
minikube addons enable ingress
minikube addons list
minikube addons enable metallb
minikube addons configure metallb
-- Enter Load Balancer Start IP: 192.168.59.20
-- Enter Load Balancer End IP: 192.168.59.30
▪ Using image metallb/speaker:v0.9.6
▪ Using image metallb/controller:v0.9.6
✅ metallb was successfully configured
etcd