Difference between revisions of "Kind: Pod"

From wikieduonline
Jump to navigation Jump to search
Line 16: Line 16:
  
 
  https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
 
  https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
<pre>
+
---
+
---
apiVersion: v1
+
apiVersion: v1
kind: Pod
+
kind: Pod
metadata:
+
metadata:
  name: frontend
+
  name: frontend
spec:
+
[[spec:]]
  containers:
+
  containers:
  - name: app
+
  - name: app
    image: images.my-company.example/app:v4
+
    image: images.my-company.example/app:v4
    resources:
+
    resources:
      requests:
+
      requests:
        memory: "64Mi"
+
        memory: "64Mi"
        cpu: "250m"
+
        cpu: "250m"
      limits:
+
      limits:
        memory: "128Mi"
+
        memory: "128Mi"
        cpu: "500m"
+
        cpu: "500m"
  - name: log-aggregator
+
  - name: log-aggregator
    image: images.my-company.example/log-aggregator:v6
+
    image: images.my-company.example/log-aggregator:v6
    resources:
+
    resources:
      requests:
+
      requests:
        memory: "64Mi"
+
        memory: "64Mi"
        cpu: "250m"
+
        cpu: "250m"
      limits:
+
      limits:
        memory: "128Mi"
+
        memory: "128Mi"
        cpu: "500m"
+
        cpu: "500m"
</pre>
 
  
  

Revision as of 11:14, 10 May 2022

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector:
    disktype: ssd


https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

---
apiVersion: v1
kind: Pod
metadata:
  name: frontend
spec:
  containers:
  - name: app
    image: images.my-company.example/app:v4
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
  - name: log-aggregator
    image: images.my-company.example/log-aggregator:v6
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"


See also

Advertising: