# 리소스 버전 검색
vagrant@k-control:~$ kubectl api-resources | grep pods
pods po true Pod PodSecurityPolicy
vagrant@k-control:~$ kubectl api-versions | grep -v \/ #/빼고 검색
v1
# YAML파일 작성할때 검색
vagrant@k-control:~$ kubectl explain pod
KIND: Pod
VERSION: v1
DESCRIPTION: # 설명
Pod is a collection of containers that can run on a host. This resource is
created by clients and scheduled onto hosts.
FIELDS: # 작성해야하는 key
apiVersion <string> #value의 형식 -스트링/스칼라
APIVersion defines the versioned schema of this representation of an
value, and may reject unrecognized values. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind <string>
Kind is a string value representing the REST resource this object
requests to. Cannot be updated. In CamelCase. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
# Cannot be updated 값을 수정할수 없다
metadata <Object>
Standard object's metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec <Object>
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status <Object>
Most recently observed status of the pod. This data may not be up to date.
Populated by the system. Read-only. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
# Read-only 사용자가 선언 X 값을 읽기만 가능하다 API서버가 정의힌다
# 하위 오브젝트 리소스 문서 확인
vagrant@k-control:~$ kubectl explain pods.spec
KIND: Pod
VERSION: v1
RESOURCE: spec <Object>
DESCRIPTION:
Specification of the desired behavior of the pod. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
PodSpec is a description of a pod.
FIELDS:
activeDeadlineSeconds <integer> # 정수형
Optional duration in seconds the pod may be active on the node relative to
StartTime before the system will actively try to mark it failed and kill
associated containers. Value must be a positive integer.
containers <[]Object> -required- # [] 리스트형 required -무조건 작성(정의)
List of containers belonging to the pod. Containers cannot currently be
added or removed. There must be at least one container in a Pod. Cannot be
updated.
'클라우드 > 쿠버네티스(Kubernetes)' 카테고리의 다른 글
쿠버네티스 Kubernetes 오브젝트 관리 / 명령형 커맨드 (Imperative Commands) (0) | 2021.07.08 |
---|---|
쿠버네티스 Kubernetes 파드(Pod) / 리소스 정보 확인 (0) | 2021.07.07 |
쿠버네티스 Kubernetes API 1 (0) | 2021.07.07 |
쿠버네티스 Kubernetes YAML (0) | 2021.07.07 |
쿠버네티스 Kubernetes 노드 초기화, 제거 (0) | 2021.07.07 |