Sunday, August 11, 2024

Step by Step for installation of Minikube on the CentOS 7

Step by Step for installation of Minikube on the CentOS 7



1) Configure the external packages:

[root@thiru ~]# yum -y install epel-release

Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile

Resolving Dependencies

--> Running transaction check

---> Package epel-release.noarch 0:7-11 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================

 Package                                   Arch                                Version                             Repository                           Size

=============================================================================================================================================================

Installing:

 epel-release                              noarch                              7-11                                extras                               15 k

Transaction Summary

=============================================================================================================================================================

Install  1 Package

Total download size: 15 k

Installed size: 24 k

Downloading packages:

epel-release-7-11.noarch.rpm                                                                                                          |  15 kB  00:00:01

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : epel-release-7-11.noarch                                                                                                                  1/1

  Verifying  : epel-release-7-11.noarch                                                                                                                  1/1

Installed:

  epel-release.noarch 0:7-11

Complete!

[root@thiru ~]#

=========================================================================

2) Install the libvirt and dependency packages:

yum -y install libvirt qemu-kvm virt-install virt-top libguestfs-tools bridge-utils

3) Start the libvirtd service:

[root@thiru ~]# systemctl status libvirtd

● libvirtd.service - Virtualization daemon

   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)

   Active: active (running) since Mon 2024-08-12 01:33:17 EDT; 1s ago

     Docs: man:libvirtd(8)

           https://libvirt.org

 Main PID: 2284 (libvirtd)

    Tasks: 19 (limit: 32768)

   CGroup: /system.slice/libvirtd.service

           ├─2284 /usr/sbin/libvirtd

           ├─2366 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

           └─2368 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Aug 12 01:33:18 thiru.localdomain dnsmasq[2358]: listening on virbr0(#4): 192.168.122.1

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: started, version 2.76 cachesize 150

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset... inotify

Aug 12 01:33:18 thiru.localdomain dnsmasq-dhcp[2366]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h

Aug 12 01:33:18 thiru.localdomain dnsmasq-dhcp[2366]: DHCP, sockets bound exclusively to interface virbr0

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: reading /etc/resolv.conf

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: using nameserver 192.168.1.254#53

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: read /etc/hosts - 3 addresses

Aug 12 01:33:18 thiru.localdomain dnsmasq[2366]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses

Aug 12 01:33:18 thiru.localdomain dnsmasq-dhcp[2366]: read /var/lib/libvirt/dnsmasq/default.hostsfile

Hint: Some lines were ellipsized, use -l to show in full.

[root@thiru ~]#

=========================================================================

4) Enable the service for automatic load after reboot of the host:

[root@thiru ~]# systemctl enable libvirtd

[root@thiru ~]#

=========================================================================

5) Crate a kubernets user who is going to manage the service

[root@thiru ~]# useradd tperiyas

[root@thiru ~]# passwd tperiyas

=========================================================================

6) Assign the user into libvirt group

[root@thiru ~]# usermod -a -G libvirt tperiyas

[root@thiru ~]#

=========================================================================

7) Enable the below parameter in /etc/libvirt/libvirtd.conf and restrict the permission for other users.

# This is restricted to 'root' by default.

unix_sock_group = "libvirt"


# Set the UNIX socket permissions for the R/O socket. This is used

# for monitoring VM status only

#

# Default allows any user. If setting group ownership, you may want to

# restrict this too.

unix_sock_ro_perms = "0777"

========================================================================

8) Download a minikube binary folder:

wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

========================================================================

9) changed the folder permission for exectable to all and moved under /usr/local/bin directory:

root@thiru ~]# chmod +x minikube-linux-amd64

[root@thiru ~]#

[root@thiru bin]# mv  minikube-linux-amd64 minikube

[root@thiru bin]#

=========================================================================

10) Your minikube machine is ready.

[root@thiru bin]# minikube version

minikube version: v1.33.1

commit: 5883c09216182566a63dff4c326a6fc9ed2982ff

[root@thiru bin]#



No comments:

Post a Comment