apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloworldnodejs-readiness
spec:
  replicas: 3
  selector:
    matchLabels:
      app: helloworldnodejs
  template:
    metadata:
      labels:
        app: helloworldnodejs
    spec:
      containers:
      - name: k8s-demo
        image: xuyongzhidocker/demo-app:node-demo-0.0.2
        ports:
        - name: nodejs-port
          containerPort: 3001
        livenessProbe:
          httpGet:
            path: /
            port: nodejs-port
          initialDelaySeconds: 15
          timeoutSeconds: 30
        readinessProbe:
          httpGet:
            path: / 
            port: nodejs-port
          initialDelaySeconds: 15
          timeoutSeconds: 30
      imagePullSecrets:
        - name: myregistrysecret