How to setup and install minikube on Fedora 32

How to setup and install minikube on Fedora 32

minikube.jpg

Test Environment –

Fedora 32 installed

Step1: Download and install the Minikube Package

As a first step download the minikube package and install the binary

Download and Install minikube binary package
[admin@fedser32.stack.com ~]$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
[admin@fedser32.stack.com ~]$ sudo install minikube-linux-amd64 /usr/local/bin/minikube

Step2: Start the Minikube cluster

Try to start the minikube cluster

Start Minikube Cluster
[admin@fedser32.stack.com ~]$ 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 detech the appropriate drive to launch itself.

Step3: Install and Configure Docker

Lets try to install docker and configure it to use for containers.

Install and Configure Docker
[admin@fedser32.stack.com ~]$ sudo dnf -y install dnf-plugins-core 
[admin@fedser32.stack.com ~]$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
[admin@fedser32.stack.com ~]$ sudo dnf install docker-ce docker-ce-cli containerd.io
[admin@fedser32.stack.com ~]$ sudo systemctl start docker
[admin@fedser32.stack.com ~]$ sudo groupadd docker
[admin@fedser32.stack.com ~]$ sudo usermod -aG docker $USER

Step4: Start Minikube cluster with Docker driver

Now, lets start the minikube again with Docker as a dirver to launch the minikube container in docker

Start Minikube Cluster with Docker driver
[admin@fedser32.stack.com ~]$ 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.

Verify Minikube Cluster status
[admin@fedser32.stack.com ~]$ 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

Install kubectl client tool
[admin@fedser32.stack.com ~]$ sudo cat <<EOF > /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 EOF [admin@fedser32.stack.com ~]$ sudo dnf -y install kubectl

Step6: Verify the minikube status and cluster pods

Verify the minikube status as shown below

Verify Minikube status
[admin@fedser32.stack.com ~]$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

List the Pods in all namespace with kubectl

List Pods using kubectl
[admin@fedser32.stack.com ~]$ 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

Launch kubernetes dashboard
[admin@fedser32.stack.com ~]$ 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

comments user
Jovan Gelineau

Hi, not necessarily you too great? Your own writing widens my information. Say thanks to you.