Hello neighbors ^.^
Good morning, sir.
Today, we're going to install a minikube on a single node and build a Kubernetis lab environment
I'll post about how. This procedure is based on uuntu.
1. Installing Minikube
Minikube is a tool that can be made in Kubernetis environment.
Then, I will try to install Minukube through the procedure below.
1) Update the version of the tool using the command below.
ubuntu@ip-172-31-31-84:~$ sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3129 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1170 kB]
Fetched 4527 kB in 1s (3739 kB/s)
Reading package lists... Done
2) Install connecttrack using the command below.
sudo apt-get install conntrack
ubuntu@ip-172-31-31-84:~$ sudo apt-get install conntrack
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
nftables
The following NEW packages will be installed:
conntrack
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 30.3 kB of archives.
After this operation, 104 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 conntrack amd64 1:1.4.5-2 [30.3 kB]
Fetched 30.3 kB in 0s (1965 kB/s)
Selecting previously unselected package conntrack.
(Reading database ... 62027 files and directories currently installed.)
Preparing to unpack .../conntrack_1%3a1.4.5-2_amd64.deb ...
Unpacking conntrack (1:1.4.5-2) ...
Setting up conntrack (1:1.4.5-2) ...
Processing triggers for man-db (2.9.1-1) ...
3) 아래 명령을 통해 minikube를 다운로드를 하고 설치하고 minikube를 시작 합니다.
curl -LO https://github.com/kubernetes/minikube/releases/download/v1.28.0/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start --driver=none --kubernetes-version=v1.23.0 --addons=ingress,metrics-server
ubuntu@ip-172-31-31-84:~$ curl -LO https://github.com/kubernetes/minikube/releases/download/v1.28.0/minikube-linux-amd64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 73.1M 100 73.1M 0 0 199M 0 --:--:-- --:--:-- --:--:-- 199M
ubuntu@ip-172-31-31-84:~$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
ubuntu@ip-172-31-31-84:~$ minikube start --driver=none --kubernetes-version=v1.23.0 --addons=ingress,metrics-server
* minikube v1.28.0 on Ubuntu 20.04
* Using the none driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Running on localhost (CPUs=2, Memory=7836MB, Disk=29587MB) ...
* minikube 1.32.0 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.32.0
* To disable this notice, run: 'minikube config set WantUpdateNotification false'
! StartHost failed, but will try again: creating host: create: precreate: exec: "docker": executable file not found in $PATH
* Running on localhost (CPUs=2, Memory=7836MB, Disk=29587MB) ...
* Failed to start none bare metal machine. Running "minikube delete" may fix it: creating host: create: precreate: exec: "docker": executable file not found in $PATH
X Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: exec: "docker": executable file not found in $PATH
*
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ * If the above advice does not help, please let us know: │
│ https://github.com/kubernetes/minikube/issues/new/choose │
│ │
│ * Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
2. Install Kubectl.
1) Download kubectl and proceed with the installation using the command below.
curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl sudo apt-get install conntrack
ubuntu@ip-172-31-31-84:~$ curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 138 100 138 0 0 2875 0 --:--:-- --:--:-- --:--:-- 2875
100 44.4M 100 44.4M 0 0 33.7M 0 0:00:01 0:00:01 --:--:-- 35.2M
ubuntu@ip-172-31-31-84:~$
ubuntu@ip-172-31-31-84:~$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
ubuntu@ip-172-31-31-84:~$
2) Check the kubectlversion.
kubectl version --output yaml
ubuntu@ip-172-31-31-84:~$ kubectl version --output yaml
clientVersion:
buildDate: "2021-12-07T18:16:20Z"
compiler: gc
gitCommit: ab69524f795c42094a6630298ff53f3c3ebab7f4
gitTreeState: clean
gitVersion: v1.23.0
goVersion: go1.17.3
major: "1"
minor: "23"
platform: linux/amd64
The connection to the server localhost:8080 was refused - did you specify the right host or port?
ubuntu@ip-172-31-31-84:~$
3) For the automatic completion of the Bash function, set it as follows
ubuntu@ip-172-31-23-60:~$ echo 'source <(kubectl completion bash)' >>~/.bashrc
ubuntu@ip-172-31-23-60:~$ echo 'alias k=kubectl' >>~/.bashrc
ubuntu@ip-172-31-23-60:~$ echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
ubuntu@ip-172-31-23-60:~$ exec bash
3. Install Helm.
Helm is a package management tool that allows you to install Kubernetis' resources at once.
1) Install Helm using the command below.
curl -LO https://get.helm.sh/helm-v3.11.0-linux-amd64.tar.gz
tar -zxvf helm-v3.11.0-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
ubuntu@ip-172-31-31-84:~$ curl -LO https://get.helm.sh/helm-v3.11.0-linux-amd64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.3M 100 14.3M 0 0 39.6M 0 --:--:-- --:--:-- --:--:-- 39.6M
ubuntu@ip-172-31-31-84:~$ tar -zxvf helm-v3.11.0-linux-amd64.tar.gz
linux-amd64/
linux-amd64/helm
linux-amd64/LICENSE
linux-amd64/README.md
ubuntu@ip-172-31-31-84:~$
ubuntu@ip-172-31-31-84:~$ sudo mv linux-amd64/helm /usr/local/bin/helm
3. Install Helm.
Helm is a package management tool that allows you to install Kubernetis' resources at once.
1) Install Helm using the command below.
ubuntu@ip-172-31-31-84:~$ helm version
version.BuildInfo{Version:"v3.11.0", GitCommit:"472c5736ab01133de504a826bd9ee12cbe4e7904", GitTreeState:"clean", GoVersion:"go1.18.10"}
ubuntu@ip-172-31-31-84:~$
We have now installed all Kubernetis environments in one node.
Then you can proceed with the test you want.
'Kubernetes' 카테고리의 다른 글
[Kubernetis] Using Kubernetis service objects (99) | 2024.03.24 |
---|---|
[Kubernetis] Access API with curl (95) | 2024.03.20 |
[Cloud] 13. making kubernetes Helm Template (41) | 2023.02.13 |
[Cloud] 12. using Kubernetes Helm (17) | 2023.02.12 |
[Cloud] 11. Using Kubernetes Volume (31) | 2023.02.11 |