I can’t get why my check on deployments goes wrong (svc is green flagged).
Tried many combinations (put container name = blue-apd or green-apd, remove label version: v1 from Deployment layer leaving in the child template\selector…nothing changes)
These are my deployments:
blue_apd:
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2024-11-18T15:53:38Z"
generation: 1
labels:
app: blue-apd
type-one: blue
version: v1
name: blue-apd
namespace: default
resourceVersion: "4317"
uid: 61916c77-6db7-441c-a2d5-abdaf9a6de25
spec:
progressDeadlineSeconds: 600
replicas: 7
revisionHistoryLimit: 10
selector:
matchLabels:
app: blue-apd
type-one: blue
version: v1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: blue-apd
type-one: blue
version: v1
spec:
containers:
- image: kodekloud/webapp-color:v1
imagePullPolicy: IfNotPresent
name: webapp-color
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 7
conditions:
- lastTransitionTime: "2024-11-18T15:53:55Z"
lastUpdateTime: "2024-11-18T15:53:55Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2024-11-18T15:53:38Z"
lastUpdateTime: "2024-11-18T15:53:56Z"
message: ReplicaSet "blue-apd-7f65c5fd79" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 7
replicas: 7
updatedReplicas: 7
green_apd
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2024-11-18T15:53:38Z"
generation: 1
labels:
app: green-apd
type-two: green
version: v1
name: green-apd
namespace: default
resourceVersion: "4326"
uid: d665e350-ada1-4250-aee2-24bf5cf344f8
spec:
progressDeadlineSeconds: 600
replicas: 3
revisionHistoryLimit: 10
selector:
matchLabels:
app: green-apd
type-two: green
version: v1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: green-apd
type-two: green
version: v1
spec:
containers:
- image: kodekloud/webapp-color:v2
imagePullPolicy: IfNotPresent
name: webapp-color
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 3
conditions:
- lastTransitionTime: "2024-11-18T15:53:58Z"
lastUpdateTime: "2024-11-18T15:53:58Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2024-11-18T15:53:38Z"
lastUpdateTime: "2024-11-18T15:53:58Z"
message: ReplicaSet "green-apd-d786b9498" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 3
replicas: 3
updatedReplicas: 3