I am creating four replicas of a deployment. The concern is that all pods go to different nodes. I have no PodAffinity defined. I have 4 nodes in my cluster and 3 master nodes. I have one deployment already running on one pod (only one replica), which occupies a node. Now, I am trying to deploy another deployment (4 replicas), which fails. Why is it not spreading pods on existing nodes in place of failing?
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: product-download-deployment-sslsigned-live
spec:
replicas: 4
template:
metadata:
labels:
app: product-download-service-sslsigned-live
color: blue
spec:
hostNetwork: true
containers:
- name: product-download-api
image: 5648601107.dkr.ecr.us-west-2.amazonaws.com/pd_repo_8080
ports:
- containerPort: 8080
volumeMounts:
- name: pd-log-volume
mountPath: /tmp/pd_log
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
- name: nginxhttps
image: 5648601107.dkr.ecr.us-west-2.amazonaws.com/nginx_ssl
ports:
- containerPort: 443
readinessProbe:
httpGet:
path: /product-downloads/health
port: 443
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /product-downloads/health
port: 443
scheme: HTTPS
initialDelaySeconds: 15
periodSeconds: 20
volumes:
- name: pd-log-volume
hostPath:
path: /var/log/pd
type: DirectoryOrCreate