쿠버네티스 YAML ENV에 MEMORY Limit 정보 넣기

  • ninemmpo
    (9미리포)
  • ninemmpo's Avatar 이 글의 작성자
  • Offline
  • Junior
  • Junior
더보기
15 Jun 2022 15:50 #31909 작성자: ninemmpo
ninemmpo 님의 글: 쿠버네티스 YAML ENV에 MEMORY Limit 정보 넣기
apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - image: bash
    name: mycontainer
    command: ['bash','-c','sleep 1000000']
    env:
    - name: MY_IP
      valueFrom:
        fieldRef:
          fieldPath: status.podIP
    - name: MY_NAMESPACE
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace
    - name: MY_MEMORY_LIMIT
      valueFrom:
        resourceFieldRef:
          containerName: mycontainer
          resource: limits.memory
          divisor: 1Mi
Time to create page: 0.053 seconds
Powered by Kunena Forum