반응형
minikube : 하나의 노드로 구성된 간단한 클러스터를 배포하는 가벼운 쿠버네티스
1. 사용자 생성(minikube) 및 설정 작

[root@localhost ~]# useradd minikube
[root@localhost ~]# passwd --stdin minikube

[root@localhost ~]# echo "minikube ALL=(ALL) ALL" >> /etc/sudoers.d/minikube
[root@localhost ~]# sudo usermod -aG docker minikube && newgrp docker
2. minikube 설치

[minikube@localhost ~]$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
[minikube@localhost ~]$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
3. kubectl 설치

[root@localhost ~]# curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
[root@localhost ~]# sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
4. minikube 실행

5. dashboard

[minikube@localhost ~]$ minikube start
※ Exiting due to HOST_BROWSER: failed to open browser: exit status 3 오류시 추가 명령어 실행
[minikube@localhost ~]$ kubectl proxy --address='0.0.0.0' --disable-filter=true
VM IP:Port/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/

6. hello-world

[minikube@localhost ~]$ kubectl run hello-world --image=hello-world -it --restart=Never
< 옵 션 >
--restart=Never : pod가 컨트롤러를 통해서가 아니라 직접 기동
-it : docker에서와 똑같이 터미널과 연결하여 입력을 연결하는 대화 모드 설정 관련 옵션
7. pod 확인

[minikube@localhost ~]$ kubectl get pod
8. dashboard 확인

반응형
'CentOS > Docker' 카테고리의 다른 글
| [Docker]Docker build 기본 순서 (0) | 2022.06.08 |
|---|---|
| [Docker][k8s]kubespray - kubernetes 설치 (0) | 2022.06.04 |
| [Docker]빌더 패턴 (0) | 2022.06.02 |
| [Docker]CMD vs ENTRYPOINT (0) | 2022.05.25 |
| [Docker]container 접속 (0) | 2022.05.25 |