<p>I am able to deploy the database service itself, but when I try to deploy with a persistent volume claim as well, the deployment silently fails. Below is the <code>deployment.yaml</code> file I am using. The service deploys fine if I remove the first 14 lines that define the persistent volume claim.</p>
<pre><code>apiVersion: apps/v1
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: timescale-pvc-1
  namespace: my-namespace
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: standard
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: timescale
spec:
  selector:
    matchLabels:
      app: timescale
  replicas: 1
  template:
    metadata:
      labels:
        app: timescale
    spec:
      containers:
      - name: timescale
        image: timescale/timescaledb:2.3.0-pg11
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 5432
        env:
              - name: POSTGRES_PASSWORD
                value: &quot;password&quot;
              - name: POSTGRES_DB
                value: &quot;metrics&quot;
      volumes:
        - name: timescaledb-pv
          persistentVolumeClaim:
            claimName: timescale-pvc-1
</code></pre>

RagePwn
<p>Consider StatefulSet for running stateful apps like databases. Deployment is preferred for stateless services.</p>
<p>You are using the below storage class in the PVC.</p>
<pre><code>storageClassName: standard
</code></pre>
<p>Ensure the storage class supports dynamic storage provisioning.</p>
