https://rancher.com/ logo
#kubernetes
Title
# kubernetes
q

quiet-park-6213

12/02/2022, 5:39 AM
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: abc
  labels:
    app: abc
spec:
  replicas: 2
  selector:
    matchlabels:
      app: abc
  template:
    metadata:
      labels:
        app: abc
    spec:
      volumes:
      - name: mydir
        hostPath:
          path: /var/log/abc
          type: DirectoryOrCreate

      containers:

      - name: abc
        image: gcr/abc:xyz
        command: ["/bin/bash","-c"]
        args:
          - cp abc/env_settings/uat2.py abc/settings.py;
            cp wsgi/uat.wsgi abc.py;
            bash gunicorn_docker.sh var abc0.0.0.0:6000 <http://pqr.aaa.com|pqr.aaa.com> UAT-APP;
            bash;
        livenessProbe:
          exec:
            command:
              - /bin/bash
              - -c
              - netstat -atulnp | grep :6000 || exit 1
          initialDelaySeconds: 30
          periodSeconds: 30
          timeoutSeconds: 10
        ports:
        - containerPort: 6000
          name: abc-port
        volumeMounts:
        - mountPath: /var/log/abc
          name: mydir
This is my yaml file but I am not getting error if any of the command is getting failed during deployment. Can someone please help me
2 Views