This section briefly describes how to install and set up minikube for testing the operator.
You need to have installed these programs on your computer:
Is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes. Download it here.
Is a virtualization software. You can use other virtual machine or container manager with Minikube but VirtualBox has proven most stable for minikube. Download it here.
Is the Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. Download it here.
Once you have minikube working, it is quite easy to start a local cluster.
|You can run a cluster with less resources, but it wont be able to run any workloads. The amount of resources in this example wont let you run XP clusters. Feel free to add more juice if your machine can handle it.|
$ minikube start \ --cpus=2 \ --memory=4gb \ --disk-size=10gb \ --vm-driver=virtualbox \ --kubernetes-version=v1.17.17 * Using the virtualbox driver based on user configuration * Starting control plane node minikube in cluster minikube * Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=10240MB) ... * Preparing Kubernetes v1.17.17 on Docker 20.10.0 ... - Generating certificates and keys ... - Booting up control plane ... - Configuring RBAC rules ... * Verifying Kubernetes components... * Enabled addons: storage-provisioner, default-storageclass * Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
When your cluster is up, it is good to add the ingress controller to it to test load balancing:
$ minikube addons enable ingress * Verifying ingress addon... * The 'ingress' addon is enabled
Verify your setup by running:
$ kubectl cluster-info Kubernetes control plane is running at https://192.168.99.252:8443 KubeDNS is running at https://192.168.99.252:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Once you are done with your cluster, you can delete the machine and all the data by running:
$ minikube delete * Deleting "minikube" in virtualbox ... * Removed all traces of the "minikube" cluster.