I have a .yaml file which creates a deployment and service for nginx image. Creating both runs fine however when I check the deployment status I get this:
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
frontend 1 1 1 0 8m
Available is always at 0. Below is my .yaml file:
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
app: website
tier: frontend
type: LoadBalancer
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: frontend
spec:
template:
metadata:
labels:
app: website
tier: frontend
spec:
containers:
- image: killabien/nginx
name: nginx
Website selector is pointing to another deployment. I thought that maybe my image is corrupted and changed it to standard nginx:alpine but the result was the same. Why is the deployment not created?
Ok, so it turned out that my nginx configuration file was incorrect. I had to change it and it's running fine now.