Objects in Kubernetes

woo94·2023년 7월 4일
0

원글 의 내용을 요약 및 번역하였습니다.

Understanding Kubernetes objects

Kubernetes object는 Kubernetes system의 persistent entity들이다. Kubernetes는 이러한 entity들을 cluster의 state를 표현할 때 사용한다. 특히 다음의 것들을 서술한다:

  • 어떤 containerized application이 실행중인가(어떤 node에서)
  • 해당 application들이 사용가능한 resource들
  • 해당 application들이 어떻게 행동하는지에 대한 정책, 예를들어 restart policy, upgrade, fault-tolerance 등

Kubernetes object는 "record of intent" 이다. Object를 생성하면, Kubernetes system은 지속적으로 그 object가 존재한다는 것을 보장하기 위해서 끊임없이 작업을 한다. Object를 생성함으로써 당신은 Kubernetes system에게 cluster의 workload가 어땠으면 좋겠다는 desired state를 효과적으로 전달하게 된다.

Kubernetes object를 생성, 수정, 삭제 등을 하기 위해서는 Kubernetes API를 사용해야 한다.

Object spec and status

spec을 가지는 object들은 object를 생성할 때 이것을 설정하고, resource가 어때야 한다는 특징에 대한 서술을 같이 제공해주어야 한다: desired state.

status는 object의 current state를 설명해주고 Kubernetes system과 그것의 component들에 의해서 제공되고 업데이트 된다. Kubernetes control plane이 지속적이고 능동적으로 모든 object의 actual state를 제공된 desired state에 일치하게끔 관리한다.

예를들어 Kubernetes에서 Deployment는 cluster 위에서 실행되는 application을 표현할 수 있는 object 이다. Deployment를 생성할 때, Deployment spec에 application이 3개의 replica를 가지기를 원한다는 것을 표시할 수 있다. Kubernetes system은 Deployment spec을 읽고 desried application에 3개의 instance를 실행하기 시작한다 -- status가 spec과 일치하게.

profile
SwiftUI, node.js와 지독하게 엮인 사이입니다.

0개의 댓글