Sempre use liveness/readiness probes em produção. Pois na hora de um rolling update, o pod antigo só vai morrer quando o novo estiver live/ready
NOTE: strings starting with $
means that they should be changed to something else
apiVersion:
kind:
metadata:
spec:
apiVersion: v1
kind: Pod
metadata:
name: $pod-name
labels:
$key: $value
spec:
containers:
- name: $container-name
image: $docker-image
# it can have multiple containers here
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: $replicaset-name
labels:
$key: $value
spec:
replicas: $number
template
$pod-metadata
$pod-spec
selector:
matchLabels: # could be 'matchExpressions'
$pod-label-key: $pod-label-value
Same thing as ReplicaSets, but in the field kind:
replace ReplicaSet
with Deployment
.