kubernetes 컨테이너 부분에서 {}는 무엇을 의미하나요?

kubernetes 컨테이너 부분에서 {}는 무엇을 의미하나요?

resources: {}Kubernetes에서 in이 무엇을 의미하는지 알고 싶습니다 .pod.spec.containers.resources

답변1

kubectlKubernetes 리소스 필드에 대한 문서를 얻을 수 있습니다 . 예를 들어:

$ kubectl explain pod.spec.containers.resources
KIND:       Pod
VERSION:    v1

FIELD: resources <ResourceRequirements>

DESCRIPTION:
    Compute Resources required by this container. Cannot be updated. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
    ResourceRequirements describes the compute resource requirements.

FIELDS:
  claims    <[]ResourceClaim>
    Claims lists the names of resources, defined in spec.resourceClaims, that
    are used by this container.

    This is an alpha field and requires enabling the DynamicResourceAllocation
    feature gate.

    This field is immutable. It can only be set for containers.

  limits    <map[string]Quantity>
    Limits describes the maximum amount of compute resources allowed. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

  requests  <map[string]Quantity>
    Requests describes the minimum amount of compute resources required. If
    Requests is omitted for a container, it defaults to Limits if that is
    explicitly specified, otherwise to an implementation-defined value. Requests
    cannot exceed Limits. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

하위 필드에 대한 추가 정보가 필요한 경우 해당 필드를 명령에 추가하면 됩니다.

$ kubectl explain pod.spec.containers.resources.claims
$ kubectl explain pod.spec.containers.resources.limits
$ kubectl explain pod.spec.containers.resources.requests
...

귀하의 경우 이는 {}필드가 설정되지 않았음을 의미합니다.

관련 정보