minikube
minikube kubernetes는
macOS, Linux 및 Windows에서 로컬 Kubernetes 클러스터를 신속하게 설정합니다.
애플리케이션 개발자와 새로운 Kubernetes 사용자를 돕는 데 중점을 둡니다.minikube kubernetes docker
0.minikube사전준비
0-1. 테스트 사양
Spec : 4Core 8Memory |
Os : Ubuntu 22.04 |
0-2. 준비
2vCore CPU |
2GB Memory |
20GB Free Disk |
컨테이너를 실행하기 위한 런타임 환경(Docker 등) |
1.docker 설치
sudo apt-get update \ && sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common -y \ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – \ && sudo apt-key fingerprint 0EBFCD88 \ && sudo add-apt-repository \ “deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable” \ && sudo apt-get update \ && sudo apt-get install docker-ce docker-ce-cli containerd.io -y |
1-1.계정 설정
sudo usermod -aG docker $USER # 현재 접속중인 사용자에게 권한주기 sudo usermod -aG docker your-user # your-user 사용자에게 권한주기 |
# docker version Client: Docker Engine – Community Version: 24.0.7 API version: 1.43 Go version: go1.20.10 Git commit: afdd53b Built: Thu Oct 26 09:07:41 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine – Community |
2.Kubectl
cd /usr/local/bin \ && sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl \ && sudo chmod +x kubectl \ && kubectl version –client
Client Version: version.Info{Major:”1″, Minor:”17″, GitVersion:”v1.17.0″, GitCommit:”70132b0f130acc0bed193d9ba59dd186f0e634cf”, GitTreeState:”clean”, BuildDate:”2019-12-07T21:20:10Z”, GoVersion:”go1.13.4″, Compiler:”gc”, Platform:”linux/amd64″} |
3.Minikube
sudo mkdir -p /usr/local/bin \ && cd /usr/local/bin \ && sudo curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ && sudo chmod +x minikube \ # minikube version |
3-1.minikube 실행
# minikube start –cpus 2 –memory 6000 … 🏄 Done! kubectl is now configured to use “minikube” cluster and “default” namespace by default |
3-2.minikube 확인
# minikube status minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured |
minikube 설치는 완료 입니다.
3-3. minikube 테스트
# kubectl run test –image=nginx kubectl run –generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run –generator=run-pod/v1 or kubectl create instead. deployment.apps/test created # kubectl get deployment # kubectl get pods # kubectl describe pod test 상세 확인 |
4.minikube ingress 설치
# minikube addons enable ingress 💡 ingress is an addon maintained by Kubernetes. For any concerns contact minikube on GitHub. You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS ▪ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20231011-8b53cabe0 ▪ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20231011-8b53cabe0 ▪ Using image registry.k8s.io/ingress-nginx/controller:v1.9.4 🔎 Verifying ingress addon… 🌟 The ‘ingress’ addon is enabled |
4-1.minikube worker 노드 생성
# kubectl get nodes # minikube node add –worker # kubectl get nodes -o wide
접속 테스트 # minikube ssh -n minikube-m02 |
이상 minikube 설치였습니다.