<p>I  created below statfulset on microk8s:</p>
<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: postgresql13
spec:
  selector:
    matchLabels:
      app: postgresql13
  serviceName: postgresql13
  replicas: 1
  template:
    metadata:
      labels:
        app: postgresql13
    spec:
      containers:
        - name: postgresql13
          image: postgres:13
          imagePullPolicy: Always
          ports:
            - containerPort: 5432
              name: sql-tcp
          volumeMounts:
            - name: postgresql13
              mountPath: /data
          env:
            - name: POSTGRES_PASSWORD
              value: testpassword
            - name: PGDATA
              value: /data/pgdata
  volumeClaimTemplates:
    - metadata:
        name: postgresql13
      spec:
        storageClassName: &quot;microk8s-hostpath&quot;
        accessModes: [&quot;ReadWriteOnce&quot;]
        resources:
          requests:
            storage: 1Ki
</code></pre>
<p>in the <code>volumeClaimTemplates</code> i gave it only 1Ki (this is one KB right ?)
But the DB started normally and when i run <code>kubectl exec postgresql13-0 -- df -h</code> on the pod i get this</p>
<pre><code>Filesystem                         Size  Used Avail Use% Mounted on
overlay                             73G   11G   59G  15% /
tmpfs                               64M     0   64M   0% /dev
/dev/mapper/ubuntu--vg-ubuntu--lv   73G   11G   59G  15% /data
shm                                 64M   16K   64M   1% /dev/shm
tmpfs                              7.7G   12K  7.7G   1% /run/secrets/kubernetes.io/serviceaccount
tmpfs                              3.9G     0  3.9G   0% /proc/acpi
tmpfs                              3.9G     0  3.9G   0% /proc/scsi
tmpfs                              3.9G     0  3.9G   0% /sys/firmware
</code></pre>
<p>Isn't is supposed to not use more than what the PVC have ?
I intentially sat the storage class <code>AllowVolumeExpansion:  False</code></p>
<p>what am i missing here ?</p>

<p><a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#allow-volume-expansion" rel="nofollow noreferrer">allowVolumeExpansion</a> and storage size does not apply to <code>hostPath</code>. The actual size will be the host volume size where the host path resides.</p>
