-
[쿠버네티스] 튜토리얼 요약 - 클러스터 생성하기SW 개발/쿠버네티스 2021. 9. 9. 22:57
버전 확인 및 시작하기. memory를 지정하는 옵션이 있다. cluster가 시작되고, 머신의 리소스가 표시된다. os(우분투) 버전이 나오고 서버를 마구 설정하고(certificates, keys, rbac rules) 완료된다. namespace를 기본으로 "default"로 사용한다고 한다. 이걸로 kubernetes cluster가 실행되었다! minikube가 가상 머신을 시작하고 가상 머신에서 kubenetes가 동작한다. (밑에 preparing kubernetes 보이지?)
Kubernetes Bootcamp Terminal $ minikube version minikube version: v1.18.0 commit: ec61815d60f66a6e4f6353030a40b12362557caa-dirty $ minikube start * minikube v1.18.0 on Ubuntu 18.04 (kvm/amd64) * Using the none driver based on existing profile X The requested memory allocation of 2200MiB does not leave room for system overhead (total system memory: 2460MiB). You may face stability issues. * Suggestion: Start minikube with less memory allocated: 'minikube start --memory=2200mb' * Starting control plane node minikube in cluster minikube * Running on localhost (CPUs=2, Memory=2460MB, Disk=194868MB) ... * OS release is Ubuntu 18.04.5 LTS * Preparing Kubernetes v1.20.2 on Docker 19.03.13 ... - kubelet.resolv-conf=/run/systemd/resolve/resolv.conf - Generating certificates and keys ... - Booting up control plane ... - Configuring RBAC rules ... * Configuring local host environment ... * Verifying Kubernetes components... - Using image gcr.io/k8s-minikube/storage-provisioner:v4 * Enabled addons: storage-provisioner, default-storageclass * Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Kubernetes와 통신하기 위해서 kubectl 명령을 사용한다. 클라이언트와 서버 버전이 표시된다. 클라이언트 버전은 kubectl 버전이고 서버 버전은 master에 설치된 kubernetes 버전이다.
$ kubectl version Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
클러스터 정보를 확인한다. control plane 주소가 나오고, 자체적으로 dns도 동작하나 보다. node 정보도 확이할 수 있다. 1개의 노드가 ready 되어있다. 이제 application 을 배포할 수 있다.
$ kubectl cluster-info Kubernetes control plane is running at https://172.17.0.13:8443 KubeDNS is running at https://172.17.0.13:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. $ kubectl get nodes NAME STATUS ROLES AGE VERSION minikube Ready control-plane,master 13m v1.20.2
'SW 개발 > 쿠버네티스' 카테고리의 다른 글
[쿠버네티스] 모듈3 - Explore your app 튜토리얼 요약 (0) 2021.09.15 [쿠버네티스] 파드 Pod 와 노드 Node (1) 2021.09.15 [쿠버네티스] 학습/요약 - 디플로이먼트 생성하기 (0) 2021.09.09 [쿠버네티스] 개념 학습/요약 - 클러스터, 노드, 컨트롤 플레인 (0) 2021.09.09