Changes

Jump to navigation Jump to search
508 bytes added ,  11:40, 20 June 2021
== pod ==
pods are more-or-less equivalent to containers
 
the simplest way to start a pod is to create a temporary file
 
<syntaxhighlight lang="yaml">
apiVersion: v1
kind: Pod
metadata:
name: shell-debug
spec:
containers:
- name: debian
image: debian
command: ['bash', '-c', 'sleep infinity']
</syntaxhighlight>
 
and apply it with
<code>kubectl apply -f file.yaml</code>. you can also apply it directly from stdin using
<syntaxhighlight lang="bash">
kubectl apply -f - <<EOF
kind: Pod
metadata:
...
EOF
</syntaxhighlight>
 
== deployment ==
A deployment creates a replica-set, that can consist out of several pods. Deployments can be used for stateless services, e.g. our website. Services that are not stateless can be deployed with [[#statefulset|statefulsets]]
== StatefulSet ==
''Statefulsets'' will start [[#pod|pods]], similar to [[#deployment|deployments]], but will also create a new volume for each new pod and automatically mount the respective volumes on pods that have been restarted.
 
== DaemonSet ==
== persistentvolume ==
''persistentvolume''s are usually automatically created, when a [[#persistentvolumeclaim|persistentvolumeclaim]] is being created.
== persistentvolumeclaim ==
''Persistentvolumeclaim''s relate [[#pod|pods]] to [[#persistentvolume|persistentvolumes]]. They are usually automatically created when a pod needs a volume.
 
= files =
Each resource requires at least the following attributes:
=== apiVersion ===
As of June 2020, this should always be <code>apps/v1</code> 
=== kind ===
The kind attribute specifies, which kind of [[#resource|resource]] is being declared.

Navigation menu