How to setup and install minikube on Fedora 32

Test Environment
Fedora 32 installed
Procedure
Step1: Download and install the Minikube Package
As a first step download the minikube package and install the binary.
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
Step2: Start the Minikube cluster
Try to start the minikube cluster.
$ minikube start
π minikube v1.20.0 on Fedora 32
π Unable to pick a default driver. Here is what was considered, in preference order:
βͺ vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
βͺ docker: Not installed: exec: "docker": executable file not found in $PATH
βͺ kvm2: Not installed: exec: "virsh": executable file not found in $PATH
βͺ none: Not installed: exec: "docker": executable file not found in $PATH
βͺ podman: Not healthy: "sudo -k -n podman version --format {{.Version}}" exit status 1: sudo: a password is required
βͺ virtualbox: Not installed: unable to find VBoxManage in $PATH
β Exiting due to DRV_NOT_DETECTED: No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/
As shown above minikube is unable to detect the appropriate drive to launch itself.
Step3: Install and Configure Docker
Lets try to install docker and configure it to use for containers.
$ sudo dnf -y install dnf-plugins-core
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
$ sudo dnf install docker-ce docker-ce-cli containerd.io
$ sudo systemctl start docker
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
Step4: Start Minikube cluster with Docker driver
Now, lets start the minikube again with Docker as a driver to launch the minikube container in docker.
$ minikube start --driver=docker
π minikube v1.20.0 on Fedora 32
β¨ Using the docker driver based on user configuration
π Starting control plane node minikube in cluster minikube
π Pulling base image ...
πΎ Downloading Kubernetes v1.20.2 preload ...
> gcr.io/k8s-minikube/kicbase...: 173.51 MiB / 358.10 MiB 48.45% 2.28 MiB
> preloaded-images-k8s-v10-v1...: 276.99 MiB / 491.71 MiB 56.33% 3.06 MiB
> preloaded-images-k8s-v10-v1...: 292.17 MiB / 491.71 MiB 59.42% 3.16 MiB
> gcr.io/k8s-minikube/kicbase...: 216.79 MiB / 358.10 MiB 60.54% 2.09 MiB
> gcr.io/k8s-minikube/kicbase...: 218.27 MiB / 358.10 MiB 60.95% 2.10 MiB
> preloaded-images-k8s-v10-v1...: 312.71 MiB / 491.71 MiB 63.60% 2.82 MiB
> preloaded-images-k8s-v10-v1...: 313.37 MiB / 491.71 MiB 63.73% 2.85 MiB
> gcr.io/k8s-minikube/kicbase...: 219.46 MiB / 358.10 MiB 61.28% 2.09 MiB
> preloaded-images-k8s-v10-v1...: 491.71 MiB / 491.71 MiB 100.00% 2.96 MiB
> gcr.io/k8s-minikube/kicbase...: 358.10 MiB / 358.10 MiB 100.00% 1.77 MiB
> gcr.io/k8s-minikube/kicbase...: 358.10 MiB / 358.10 MiB 100.00% 1.11 MiB
π₯ Creating docker container (CPUs=2, Memory=3900MB) ...
π³ Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
βͺ Generating certificates and keys ...
βͺ Booting up control plane ...
βͺ Configuring RBAC rules ...
π Verifying Kubernetes components...
βͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
π Enabled addons: storage-provisioner, default-storageclass
π‘ kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
π Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Verify the docker minikube container is up and running.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eedff3905e2c gcr.io/k8s-minikube/kicbase:v0.0.22 "/usr/local/bin/entrβ¦" 55 seconds ago Up 54 seconds 127.0.0.1:49157->22/tcp, 127.0.0.1:49156->2376/tcp, 127.0.0.1:49155->5000/tcp, 127.0.0.1:49154->8443/tcp, 127.0.0.1:49153->32443/tcp minikube
fe9778dfb879 hello-world "/hello" 18 minutes ago Exited (0) 18 minutes ago
Step5: Install kubectl client tool for cluster management
We can install kubectl client to manage the minikube single node cluster.
Add the following kubernetes repository.
File: /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
Install kubectl client tool.
$ sudo dnf -y install kubectl
Step6: Verify the minikube status and cluster pods
Verify the minikube status as shown below.
$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
List the Pods in all namespace with kubectl.
$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-74ff55c5b-5tx8s 1/1 Running 0 59m
kube-system etcd-minikube 1/1 Running 0 59m
kube-system kube-apiserver-minikube 1/1 Running 0 59m
kube-system kube-controller-manager-minikube 1/1 Running 0 59m
kube-system kube-proxy-2jt5r 1/1 Running 0 59m
kube-system kube-scheduler-minikube 1/1 Running 0 59m
kube-system storage-provisioner 1/1 Running 1 59m
Step7: Access the Kubernetes Dashboard URL
Now, try to launch the minikube dashboard and launch the url.
$ minikube dashboard --url
π€ Verifying dashboard health ...
π Launching proxy ...
π€ Verifying proxy health ...
http://127.0.0.1:36975/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Hope you enjoyed reading this article. Thank you..
1 COMMENT