Kubernetes Secret Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
=Internal=
=Internal=
* [[Kubernetes_Cluster_Configuration_Concepts#Secret_Manifest|Kubernetes Cluster Configuration Concepts]]
* [[Kubernetes_Cluster_Configuration_Concepts#Secret_Manifest|Kubernetes Cluster Configuration Concepts]]
* [[Kubernetes_Secrets_Operations#From_a_Manifest|Kubernetes Secrets Operations]]
=Example=
=Example=
 
<font size=-1>
  [[Kubernetes_Manifests#apiVersion|apiVersion]]: v1
  [[Kubernetes_Manifests#apiVersion|apiVersion]]: v1
  [[Kubernetes_Manifests#kind|kind]]: Pod
  [[Kubernetes_Manifests#kind|kind]]: Secret
  [[Kubernetes_Manifest_Metadata#Overview|metadata]]:
  [[Kubernetes_Manifest_Metadata#Overview|metadata]]:
   [[Kubernetes_Manifest_Metadata#name|name]]: loop
   [[Kubernetes_Manifest_Metadata#name|name]]: blue
   [[Kubernetes_Manifest_Metadata#labels|labels]]:
   [[Kubernetes_Manifest_Metadata#labels|labels]]:
     color: blue
     color: blue
   [[Kubernetes_Manifest_Metadata#annotations|annotations]]:
   [[Kubernetes_Manifest_Metadata#annotations|annotations]]:
     ...
     ...
  [[Kubernetes_Manifests#spec|spec]]:   
  [[#type|type]]: Opaque
  [[#restartPolicy|restartPolicy]]: Always
  [[#data|data]]:
   schedulerName: default-scheduler
   shape: c3F1YXJl
   terminationGracePeriodSeconds: 120
   size: bGFyZ2U=
  [[#serviceAccountName|serviceAccountName]]: 'testServiceAccount'
[[#stringData|stringData]]:
   [[#dnsPolicy|dnsPolicy]]: ClusterFirst
   color: red
  [[#containers|containers]]:
[[#immutable|immutable]]: true
  - [[#name|name]]: loop-container
</font>
    [[#image|image]]: docker.io/ovidiufeodorov/loop:latest
 
    [[#imagePullPolicy|imagePullPolicy]]: Always
=Elements=
    [[#resources|resources]]:
==type==
      [[#requests|requests]]:
==data==
        memory: '1024Mi'
==stringData==
        cpu: '500m'
==<tt>immutable</tt>==
      [[#limits|limits]]:
See: {{Internal|Kubernetes_Cluster_Configuration_Concepts#Immutable_Secrets|Immutable Secrets}}
        memory: '4096Mi'
        cpu: '1000m'
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    [[#command|command]]: ...
    [[#ports|ports]]:
    - [[#containerPort|containerPort]]: 8080
      [[#protocol|protocol]]: TCP
      [[#port_name|name]]: 'http'
    - containerPort: 8787
      protocol: TCP
    - containerPort: ...
      [[#hostPort|hostPort]]: ....
    env:
    - name: SOMETHING
      value: 'something else'
    [[#volumeMounts|volumeMounts]]:
    - [[#volume_name|name]]: 'mount-0'
      [[#mountPath|mountPath]]: '/red'
      # 'orange' must exist in the root of the volume identified by 'mount-0'; the content of that
      # directory will be exposed in the container under the '/red' directory.
      [[#subPath|subPath]]: 'orange'
    [[#readinessProbe|readinessProbe]]:
      # See [[Kubernetes_Container_Probes#Probe_Template|Probe Template]]
    [[#livenessProbe|livenessProbe]]:
      # See [[Kubernetes_Container_Probes#Probe_Template|Probe Template]]
    [[#command|command]]: ['sh', '-c', 'while true; do echo .; sleep 2; done;']
  [[#initContainers|initContainers]]:
  - [[#name|name]]: init-container1
    [[#image|image]]: busybox
    [[#command|command]]: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
  <span id='volumes_manifest'></span>[[#volumes|volumes]]:
  - name: mount-0
    hostPath:
      # '/yellow' must contain an 'orange' sub-directory
      path: '/yellow'
  - name: mount-1
    persistentVolumeClaim:
      claimName: pvc1

Latest revision as of 20:58, 28 February 2024