01-09 04:37
Recent Posts
Recent Comments
๊ด€๋ฆฌ ๋ฉ”๋‰ด

miinsun

KUBERNETES _ ํด๋Ÿฌ์Šคํ„ฐ ์ƒ์„ฑ ๋ณธ๋ฌธ

Infra/Kubernetes

KUBERNETES _ ํด๋Ÿฌ์Šคํ„ฐ ์ƒ์„ฑ

miinsun 2021. 11. 24. 16:19

๐Ÿ’ป ์‹ค์Šต ํ™˜๊ฒฝ

OS : Linux (Ubuntu 8)
Architecture : x89-64

 

๐Ÿ“Œ Minikube ์„ค์น˜

minikube ์„ค์น˜

$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
$ sudo install minikube-linux-amd64 /usr/local/bin/minikube

 

minikube ์‹คํ–‰

$ minikube start
๐Ÿ˜„  Ubuntu 20.04 ์˜ minikube v1.24.0
๐Ÿ‘Ž  Unable to pick a default driver. Here is what was considered, in preference order:
    โ–ช docker: Not installed: exec: "docker": executable file not found in $PATH
    โ–ช kvm2: Not installed: exec: "virsh": executable file not found in $PATH
    โ–ช podman: Not installed: exec: "podman": executable file not found in $PATH
    โ–ช vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
    โ–ช 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/
โŒ ์—๋Ÿฌ ๋ฐœ์ƒ
  docker๊ฐ€ ์„ค์น˜๋˜์ง€ ์•Š์•„ ์ƒ๊ธด ์˜ค๋ฅ˜

โญ• ์—๋Ÿฌ ํ•ด๊ฒฐ
     docker๋ฅผ ์„ค์น˜ํ•ด์ฃผ์ž

$ sudo apt install docker.io
$ sudo usermod -aG docker $USER && newgrp docker

   

 

๋‹ค์‹œ minikube๋ฅผ ์‹คํ–‰

$ minikube start

 > ์ด์ œ minikube๊ฐ€ ๊ฐ€์ƒ๋จธ์‹ ์—์„œ๊ฐ€์ƒ ๋จธ์‹ ์—์„œ ๋Œ์•„๊ฐ€๊ธฐ ์‹œ์ž‘

 > kubernetes ํด๋Ÿฌ์Šคํ„ฐ๊ฐ€ ํ•ด๋‹น ๊ฐ€์ƒ ๋จธ์‹ ์—์„œ ์‹คํ–‰๋จ

 

๐Ÿ“Œ Kubectl ์„ค์น˜

์ฟ ๋ฒ„ ๋„คํ‹ฐ์Šค CLI๋ฅผ ์„ค์น˜

$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

 

์„ค์น˜ ํ™•์ธ

$ kubectl version --client
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}

 

kubectl๊ฐ€ ํด๋Ÿฌ์Šคํ„ฐ์— ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ ‘๊ทผ๋๋Š”์ง€ ํ™•์ธ

$ kubectl cluster-info
Kubernetes control plane is running at https://192.168.49.2:8443
CoreDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

 

ํ˜ธ์ŠคํŒ… ํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋…ธ๋“œ๋ฅผ ํ‘œ์‹œ

$ kubectl get nodes
NAME       STATUS   ROLES                  AGE     VERSION
minikube   Ready    control-plane,master   6m57s   v1.22.3

  > ๋…ธ๋“œ๊ฐ€ ํ•˜๋‚˜๋ฟ์ด๋ฉฐ ์ƒํƒœ๊ฐ€ ์ค€๋น„๋ผ ์žˆ๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค
  > App์„ ๋ฐฐํฌํ•  ์ค€๋น„๊ฐ€ ๋จ

 

Comments