apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: node-app
  name: node-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: node-app
  template:
    metadata:
      labels:
        app.kubernetes.io/name: node-app
        app.kubernetes.io/part-of: node-app
    spec:
      containers:
      - image: node-app:latest
        imagePullPolicy: IfNotPresent
        name: node-app
        ports:
        - containerPort: 8080
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 3
          periodSeconds: 3
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 3
          periodSeconds: 3