1. 이전 포스팅에서 구축한 쿠버네티스 클러스터의 대시보드에 접속
: namespace는 default
: 우측 상단의 + 버튼으로 pod 생성
** 이전 포스팅 | [쿠버네티스 시작하기 #1] CKA 시험 준비를 위한 Kubernetes 클러스터 구축하기
** cluster 구성 service, pod | 출처 kubernetes.io
2. 대시보드에서 pod 생성
: pod 생성은 대시보드에서 + 버튼을 누르고 아래의 command를 붙여넣기하여 생성
: kubectl create -f 로 집접 내용을 작성할 수도 있다.
apiVersion: v1
kind: Pod
metadata:
name: pod-1
spec:
containers:
- name: container1
image: kubetm/p8000
ports:
- containerPort: 8000
- name: container2
image: kubetm/p8080
ports:
- containerPort: 8080
3. 생성한 pod 정보 확인
3.1. 컨테이너 정보 확인
3.2. pod ip 확인
** CNI : The most common container runtimes use Container Network Interface (CNI) plugins to manage their network and security capabilities.
The network model is implemented by the container runtime on each node. The most common container runtimes use Container Network Interface (CNI) plugins to manage their network and security capabilities. Many different CNI plugins exist from many different vendors. Some of these provide only basic features of adding and removing network interfaces, while others provide more sophisticated solutions, such as integration with other container orchestration systems, running multiple CNI plugins, advanced IPAM features etc.
네트워크 모델은 각 노드의 컨테이너 런타임에 의해 구현됩니다. 가장 일반적인 컨테이너 런타임은 컨테이너 네트워크 인터페이스 (CNI) 플러그인을 사용하여 네트워크 및 보안 기능을 관리합니다. 다양한 공급업체에서 다양한 CNI 플러그인이 존재합니다. 이 중 일부는 네트워크 인터페이스를 추가하고 제거하는 기본 기능만 제공하는 반면, 다른 일부는 다른 컨테이너 오케스트레이션 시스템과의 통합, 여러 CNI 플러그인 실행, 고급 IPAM 기능 등과 같은 보다 정교한 솔루션을 제공합니다.
- 출처 : 쿠버네티스 파운데이션 https://kubernetes.io/docs/concepts/cluster-administration/networking/
** calico :
What is Project Calico?
Project Calico is an open-source project with an active development and user community. Calico Open Source was born out of this project and has grown to be the most widely adopted solution for container networking and security, powering 8M+ nodes daily across 166 countries.
3.3. 대시보드에서 pod 접속
위 pod 화면에서 우측 상단의 파드접속 버튼으로 아래와 같이 pod console에 접속할 수 있다.
3.4. service 생성해보기
apiVersion: v1
kind: Service
metadata:
name: svc-1
spec:
selector:
app: pod
ports:
- port: 9000
targetPort: 8080
3.5. 위와 같이 pod, service를 다양하게 생성해보고 대시보드에서 확인
3.6. kubectl로 생성한 pod, service 확인
kubectl get nodes -o wide
kubectl get service -o wide
kubectl get pods -o wide
** [쿠버네티스 시작하기 #1] CKA 시험 준비를 위한 Kubernetes 클러스터 구축하기
'Compute > kubernetis' 카테고리의 다른 글
CKA | 문제 별 kubernetes.io/docs 검색 keyword 정리 (0) | 2024.12.12 |
---|---|
kubernetes pod의 컨테이너 진입 옵션 --sh 와 bash의 차이 (0) | 2024.12.09 |
[CKA] 01. kubectl autocomplete | context와 manifest의 정의 | CKA 공부를 본격적으로 시작하기 전에 (0) | 2024.12.02 |
[쿠버네티스 시작하기 #3] pv와 pvc 생성 | pv와 pvc의 차이 (3) | 2024.10.21 |
[쿠버네티스 시작하기 #1] CKA 시험 준비를 위한 Kubernetes 클러스터 구축하기 (1) | 2024.10.19 |