Editing Kind: Pod

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
+
  [[apiVersion]]: v1
  [[spec.]]
+
  [[kind:]] Pod
  [[spec.containers]]
+
  metadata:
  [[spec.initContainers]]
+
  name: nginx
[[spec.volumes]]
+
  labels:
  [[spec.nodeSelector]]
+
    env: test
 
+
  spec:
Nginx:
+
  containers:
{{kind pod nginx}}
+
  - name: nginx
 
+
    image: nginx
 
+
    imagePullPolicy: IfNotPresent
Alpine container to access a PV:
+
  [[nodeSelector]]:
{{alpine cp example}}
+
    disktype: ssd
  
  
Line 29: Line 29:
 
       requests:
 
       requests:
 
         memory: "64Mi"
 
         memory: "64Mi"
         [[cpu:]] "250m"
+
         cpu: "250m"
 
       limits:
 
       limits:
 
         memory: "128Mi"
 
         memory: "128Mi"
Line 35: Line 35:
 
   - 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"
Line 43: Line 43:
 
         cpu: "500m"
 
         cpu: "500m"
  
 
== [[initContainers]] ==
 
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#init-containers-in-use
 
apiVersion: v1
 
kind: Pod
 
metadata:
 
  name: myapp-pod
 
  labels:
 
    app: myapp
 
spec:
 
  containers:
 
  - name: myapp-container
 
    image: busybox:1.28
 
    command: ['sh', '-c', 'echo The app is running! && sleep 3600']
 
  [[initContainers]]:
 
  - name: init-myservice
 
    image: busybox:1.28
 
    command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo  waiting for myservice; sleep 2; done"]
 
  - name: init-mydb
 
    image: busybox:1.28
 
    command: ['sh', '-c', "until nslookup mydb.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for mydb; sleep 2; done"]
 
 
== Related ==
 
* <code>[[dnsPolicy:]]</code>
 
* [[Kubernetes init containers]]
 
* <code>[[autoScaler:]]</code>
 
* <code>[[envFrom:]]</code>
 
* <code>[[LivenessProbe]]</code>
 
* <code>[[lifecycle:]]</code>
 
* <code>[[ports:]]</code>
 
* [[Kubernetes, env:]]
 
* <code>[[nodeName]]</code>
 
* <code>[[NodeSelector]]</code>
 
* <code>[[kind: ReplicaSet]]</code>
 
* [[kubectl run]]
 
  
 
== See also ==
 
== See also ==
* {{kind: Pod}}
+
* [[Kind (Kubernetes)]]
* {{Pods}}
+
* {{K8s}}
  
 
[[Category:K8s]]
 
[[Category:K8s]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: