Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
kubernetes_repo_config [2020/03/30 12:35] – created andonovj | kubernetes_repo_config [2020/05/01 15:53] (current) – andonovj | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Overview===== | =====Overview===== | ||
To install kubernetes or minikube in general, which is a taste of Kubernetes. You need to configuration the repository first. | To install kubernetes or minikube in general, which is a taste of Kubernetes. You need to configuration the repository first. | ||
- | So let's configure the Repository, depending on the operation system. In our case we will use Ubuntu, but I will show how to do it in every distribution | + | So let's configure the Repository, depending on the operation system. In our case we will use Ubuntu, but the installation |
+ | In a nutshell we have to: | ||
- | =====Repo Config===== | + | - Install the GPG key |
- | Let's start with Ubuntu: | + | - Update the local Repo |
+ | - Install the kubectl | ||
- | ====Ubuntu==== | + | |
+ | =====Config===== | ||
+ | Let's start the configuration one by one, firstly: Install the GPG key: | ||
+ | |||
+ | ====Install GPG key==== | ||
< | < | ||
- | root@k8s-master:/ | + | root@k8s-master:/ |
OK | OK | ||
root@k8s-master: | root@k8s-master: | ||
Line 18: | Line 24: | ||
< | < | ||
root@k8s-master:/ | root@k8s-master:/ | ||
- | > deb https:// | ||
- | > EOF | ||
deb https:// | deb https:// | ||
+ | EOF | ||
root@k8s-master:/ | root@k8s-master:/ | ||
</ | </ | ||
Line 27: | Line 32: | ||
"deb https:// | "deb https:// | ||
+ | |||
+ | ====Update local Repo==== | ||
After that, we can update the local repo: | After that, we can update the local repo: | ||
< | < | ||
root@k8s-master:/ | root@k8s-master:/ | ||
- | Ign http:// | + | ***************************** |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Get:1 https:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit https:// | + | |
- | Hit http:// | + | |
- | Get:2 https:// | + | |
- | Get:3 https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Ign https:// | + | |
- | Hit http:// | + | |
- | Ign https:// | + | |
- | Hit http:// | + | |
- | Ign https:// | + | |
- | Hit http:// | + | |
- | Ign https:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Hit http:// | + | |
- | Ign http:// | + | |
- | Ign https:// | + | |
- | Ign http:// | + | |
- | Ign http:// | + | |
- | Ign http:// | + | |
Ign https:// | Ign https:// | ||
+ | Ign https:// | ||
Ign https:// | Ign https:// | ||
Ign https:// | Ign https:// | ||
- | Ign https:// | ||
- | Ign https:// | ||
- | Fetched 43.7 kB in 3s (11.0 kB/s) | ||
- | Reading package lists... Done | ||
- | root@k8s-master:/ | ||
Reading package lists... Done | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | E: Unable to locate package kuberctl | ||
- | root@k8s-master:/ | ||
</ | </ | ||
- | Finally, we can install the kuberctl: | + | ====Install Kubectl, Kubelete & Kubeadm ==== |
- | < | + | We can check, if the installation has been correct as follows: |
+ | Eventhough, we need only the kubectl, let' | ||
+ | < | ||
root@k8s-master:/ | root@k8s-master:/ | ||
Reading package lists... Done | Reading package lists... Done | ||
Building dependency tree | Building dependency tree | ||
Reading state information... Done | Reading state information... Done | ||
- | The following packages were automatically installed and are no longer required: | + | ***************************** |
- | acl at-spi2-core colord dconf-gsettings-backend dconf-service libasound2 | + | |
- | libasound2-data libatk-bridge2.0-0 libatspi2.0-0 libcairo-gobject2 | + | |
- | libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcolord1 | + | |
- | libcolorhug1 libdconf1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 | + | |
- | libexif12 libfontenc1 libgd3 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa | + | |
- | libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgtk-3-0 libgtk-3-bin | + | |
- | libgtk-3-common libgudev-1.0-0 libgusb2 libice6 libieee1284-3 liblcms2-2 | + | |
- | libllvm3.4 libltdl7 libnotify-bin libnotify4 libogg0 libpciaccess0 libsane | + | |
- | libsane-common libsm6 libtdb1 libtxc-dxtn-s2tc0 libv4l-0 libv4lconvert0 | + | |
- | libvorbis0a libvorbisfile3 libvpx1 libwayland-client0 libwayland-cursor0 | + | |
- | libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 | + | |
- | libxcb-sync1 libxfont1 libxkbcommon0 libxkbfile1 libxmu6 libxpm4 | + | |
- | libxshmfence1 libxt6 libxtst6 libxxf86vm1 notification-daemon | + | |
- | sound-theme-freedesktop x11-common x11-xkb-utils xfonts-base | + | |
- | xfonts-encodings xfonts-utils xserver-common xserver-xorg-core | + | |
- | Use ' | + | |
- | The following extra packages will be installed: | + | |
- | conntrack cri-tools ebtables libmnl0 libnetfilter-conntrack3 socat | + | |
- | The following NEW packages will be installed: | + | |
- | conntrack cri-tools ebtables kubeadm kubectl kubelet kubernetes-cni libmnl0 | + | |
- | libnetfilter-conntrack3 socat | + | |
- | 0 upgraded, 10 newly installed, 0 to remove and 1 not upgraded. | + | |
- | Need to get 52.1 MB of archives. | + | |
- | After this operation, 275 MB of additional disk space will be used. | + | |
- | Get:1 http:// | + | |
- | Get:2 http:// | + | |
- | Get:3 http:// | + | |
- | Get:4 http:// | + | |
- | Get:5 http:// | + | |
- | Fetched 52.1 MB in 5s (9,095 kB/s) | + | |
- | Selecting previously unselected package libmnl0: | + | |
- | (Reading database ... 63064 files and directories currently installed.) | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking libmnl0: | + | |
- | Selecting previously unselected package libnetfilter-conntrack3: | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking libnetfilter-conntrack3: | + | |
- | Selecting previously unselected package conntrack. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking conntrack (1: | + | |
- | Selecting previously unselected package cri-tools. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking cri-tools (1.13.0-00) ... | + | |
- | Selecting previously unselected package ebtables. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking ebtables (2.0.10.4-3ubuntu1.14.04.2) ... | + | |
- | Selecting previously unselected package kubernetes-cni. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking kubernetes-cni (0.7.5-00) ... | + | |
- | Selecting previously unselected package socat. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking socat (1.7.2.3-1) ... | + | |
- | Selecting previously unselected package kubelet. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking kubelet (1.18.0-00) ... | + | |
- | Selecting previously unselected package kubectl. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking kubectl (1.18.0-00) ... | + | |
- | Selecting previously unselected package kubeadm. | + | |
- | Preparing to unpack .../ | + | |
- | Unpacking kubeadm (1.18.0-00) ... | + | |
- | Processing triggers for man-db (2.6.7.1-1ubuntu1) ... | + | |
- | Processing triggers for ureadahead (0.100.0-16) ... | + | |
- | Setting up libmnl0: | + | |
- | Setting up libnetfilter-conntrack3: | + | |
- | Setting up conntrack (1: | + | |
- | Setting up cri-tools (1.13.0-00) ... | + | |
- | Setting up ebtables (2.0.10.4-3ubuntu1.14.04.2) ... | + | |
- | Setting up kubernetes-cni (0.7.5-00) ... | + | |
- | Setting up socat (1.7.2.3-1) ... | + | |
- | Setting up kubectl (1.18.0-00) ... | + | |
- | Processing triggers for ureadahead (0.100.0-16) ... | + | |
- | Setting up kubelet (1.18.0-00) ... | + | |
- | Setting up kubeadm (1.18.0-00) ... | + | |
Processing triggers for libc-bin (2.19-0ubuntu6.15) ... | Processing triggers for libc-bin (2.19-0ubuntu6.15) ... | ||
</ | </ | ||
+ | We can verify if the installation is complete by checking the version: | ||
+ | < | ||
+ | root@k8s-master:/ | ||
+ | Client Version: version.Info{Major:" | ||
+ | root@k8s-master:/ | ||
+ | </ | ||
+ | ====Install Docker==== | ||
+ | To install Minikube, we have to install a driver, so either: docker or rockat. I will go with a docker here: | ||
+ | < | ||
+ | root@k8s-master:/ | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree | ||
+ | Reading state information... Done | ||
+ | The following additional packages will be installed: | ||
+ | bridge-utils cgroupfs-mount containerd pigz runc ubuntu-fan | ||
+ | Suggested packages: | ||
+ | ifupdown aufs-tools debootstrap docker-doc rinse zfs-fuse | zfsutils | ||
+ | The following NEW packages will be installed: | ||
+ | bridge-utils cgroupfs-mount containerd docker.io pigz runc ubuntu-fan | ||
+ | 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. | ||
+ | Need to get 63.8 MB of archives. | ||
+ | After this operation, 319 MB of additional disk space will be used. | ||
+ | Do you want to continue? [Y/n] y | ||
+ | Get:1 http:// | ||
+ | Get:2 http:// | ||
+ | Get:3 http:// | ||
+ | Get:4 http:// | ||
+ | Get:5 http:// | ||
+ | Get:6 http:// | ||
+ | Get:7 http:// | ||
+ | Fetched 63.8 MB in 56s (1136 kB/s) | ||
+ | Preconfiguring packages ... | ||
+ | Selecting previously unselected package pigz. | ||
+ | (Reading database ... 80853 files and directories currently installed.) | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking pigz (2.4-1) ... | ||
+ | Selecting previously unselected package bridge-utils. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking bridge-utils (1.5-15ubuntu1) ... | ||
+ | Selecting previously unselected package cgroupfs-mount. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking cgroupfs-mount (1.4) ... | ||
+ | Selecting previously unselected package runc. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking runc (1.0.0~rc10-0ubuntu1~18.04.2) ... | ||
+ | Selecting previously unselected package containerd. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking containerd (1.3.3-0ubuntu1~18.04.1) ... | ||
+ | Selecting previously unselected package docker.io. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking docker.io (19.03.6-0ubuntu1~18.04.1) ... | ||
+ | Selecting previously unselected package ubuntu-fan. | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking ubuntu-fan (0.12.10) ... | ||
+ | Setting up runc (1.0.0~rc10-0ubuntu1~18.04.2) ... | ||
+ | Setting up cgroupfs-mount (1.4) ... | ||
+ | Setting up containerd (1.3.3-0ubuntu1~18.04.1) ... | ||
+ | Created symlink / | ||
+ | Setting up bridge-utils (1.5-15ubuntu1) ... | ||
+ | Setting up ubuntu-fan (0.12.10) ... | ||
+ | Created symlink / | ||
+ | Setting up pigz (2.4-1) ... | ||
+ | Setting up docker.io (19.03.6-0ubuntu1~18.04.1) ... | ||
+ | Adding group `docker' | ||
+ | Done. | ||
+ | Created symlink / | ||
+ | docker.service is a disabled or a static unit, not starting it. | ||
+ | Processing triggers for systemd (237-3ubuntu10.39) ... | ||
+ | Processing triggers for man-db (2.8.3-2ubuntu0.1) ... | ||
+ | Processing triggers for ureadahead (0.100.0-21) ... | ||
+ | root@k8s-master:/ | ||
+ | </ |