MiniKube 설치 v1.22.0

최지영·2022년 4월 24일
1

Minikube 설치

👀 Minikube의 최신 버전 (v1.22.0)을 간단하게 설치해보기

1. Minikube의 최신버전 바이너리를 다운

*	아래의 모든 커맨드는 amd 기반의 cpu를 기준으로 진행
* 자세한 내용은 아래의 공식 문서 확인
📖 [쿠버네티스 공식 사이트](https://kubernetes.io/ko/docs/reference/)
curl -LO https://storage.googleapis.com/minikube/releases/v1.22.0/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

2. 👉 다운로드 확인

minikube --help

3. 👉 로그 확인

	👌아래와 같이 나온다면 지극히 정상!
minikube --help
minikube provisions and manages local Kubernetes clusters optimized for development workflows.

Basic Commands:
  start          Starts a local Kubernetes cluster
  status         Gets the status of a local Kubernetes cluster
  stop           Stops a running local Kubernetes cluster
  delete         Deletes a local Kubernetes cluster
  dashboard      Access the Kubernetes dashboard running within the minikube cluster
  pause          pause Kubernetes
  unpause        unpause Kubernetes

Images Commands:
  docker-env     Configure environment to use minikube's Docker daemon
  podman-env     Configure environment to use minikube's Podman service
  cache          Add, delete, or push a local image into minikube
  image          Manage images

Configuration and Management Commands:
  addons         Enable or disable a minikube addon
  config         Modify persistent configuration values
  profile        Get or list the current profiles (clusters)
  update-context Update kubeconfig in case of an IP or port change

Networking and Connectivity Commands:
  service        Returns a URL to connect to a service
  tunnel         Connect to LoadBalancer services

Advanced Commands:
  mount          Mounts the specified directory into minikube
  ssh            Log into the minikube environment (for debugging)
  kubectl        Run a kubectl binary matching the cluster version
  node           Add, remove, or list additional nodes
  cp             Copy the specified file into minikube

Troubleshooting Commands:
  ssh-key        Retrieve the ssh identity key path of the specified node
  ssh-host       Retrieve the ssh host key of the specified node
  ip             Retrieves the IP address of the specified node
  logs           Returns logs to debug a local Kubernetes cluster
  update-check   Print current and latest version number
  version        Print the version of minikube

Other Commands:
  completion     Generate command completion for a shell

4. 👉 minikube 버전도 한번 확인

	minikube version

Kubectl 설치

✍ Kubectl (쿠베 컨트롤) 도 한번 설치해보자!

근데 Kubectl은 또 뭐지❔

  • Kubectl 은 쿠버네티스 클러스터 (server)에 요청을 간편하게 보내기 위해 사용되는 client 툴!

설치 시작

그렇다면 일단 설치부터 한번 긔긔 👌

1. kubec4l v1.22.1로 다운

	curl -LO https://dl.k8s.io/release/v1.22.1/bin/linux/amd64/kubectl	

2. 권한 및 위치 변경

  • kubec4l 바이너리를 사용할 수 있도록 권한과 위치를 변경
   sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

📃 3. 설치 확인

 kubectl --help

4. 버전 확인

kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:45:37Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

연결 거부? 끝난게 아니였어? 🤣


  • 😜 kubectl 명령어는 클라이언츠 버전과 쿠버네티스 서버 버전을 동시에 출력하기 때문에 위의 Client 버전은 문제 없이 출력되지만 아직 설치가 안된 쿠버네티스 서버 8080포트에 연결하려고 했기 때문에 오류 메시지 출력이라서 사실상 정상적인 로그

Minikube도 시작해봐야지

Minikube 시작 !

Minikube start

  • 👌 minikube를 docker driver를 기반으로 하여 시작
      minikube start --drvier =docker

📃 로그 확인

😁 다음 아래와 같은 로그가 출력되면 성공적으로 미니쿠베 설치 완료!

📃 상태 확인

정상적으로 생성 되었는지 미니쿠베의 상태를 확인해보자!

 minikube status

👍 아래처럼 나온다면 성공적!

 minikube
 type: Control Plane
 host: Running
 kubelet: Running
 spiserver: Running
 kubeconfig: Configured

그럼 아까 오류로그를 출력했던 kubectl version도 다시 확인!

  • 문제없이 서버 버전도 출력이 되는걸 볼수 있다!
kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:45:37Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}

pod 확인

정상적으로 설치가 완료 되었다면 마지막으로 pod 확인

✔ 아래와 같이 입력

 kubectl get pod -n kube-system

👍 그림처럼 모두 Running 으로 나와야 성공!

0개의 댓글