I have been creating pods with type:deployment
but I see that some documentation uses type:pod
, more specifically the documentation for multi-conta
Pod is container instance.
That is the output of replicas: 3
Think of one deployment
can have many running instances(replica).
//deployment.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: tomcat-deployment222
spec:
selector:
matchLabels:
app: tomcat
replicas: 3
template:
metadata:
labels:
app: tomcat
spec:
containers:
- name: tomcat
image: tomcat:9.0
ports:
- containerPort: 8080