<p>I am performing a <code>kubectl apply -f jenkins_pvc.yaml</code> where</p>

<pre><code>$ cat jenkins_pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: "jenkins-cd-pvc"
  namespace: "jenkins"
  finalizers: null
spec:
  storageClassName: "standard"
  volumeName: "jenkins-cd-pv"
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: "200Gi"
</code></pre>

<p>however the finalizers field is not taken into account from what the pvc description indicates:</p>

<pre><code>▶ k describe pvc jenkins-cd-pvc
Name:          jenkins-cd-pvc
Namespace:     jenkins
StorageClass:  standard
Status:        Bound
Volume:        jenkins-cd-pv
Labels:        &lt;none&gt;
Annotations:   pv.kubernetes.io/bind-completed: yes
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      200Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Mounted By:    jenkins-cd-6d8f5c79d6-xt2fs
Events:        &lt;none&gt;
</code></pre>

<p>Why is that?</p>

<p><a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#storageobjectinuseprotection" rel="nofollow noreferrer">StorageObjectInUseProtection</a> plugin <a href="https://github.com/kubernetes/kubernetes/blob/fb87f72b882abc28c7331c3d089d0c096f31dd26/plugin/pkg/admission/storage/storageobjectinuseprotection/admission.go#L129" rel="nofollow noreferrer">adds</a> the <code>kubernetes.io/pvc-protection</code> finalizer to newly created Persistent Volume Claims (PVCs).</p>

<p>You can disable this admission controller which is enabled by default.</p>

<p>To see which admission plugins are enabled</p>

<pre><code>kube-apiserver -h | grep enable-admission-plugins
</code></pre>

<p>The Kubernetes API server flag <code>disable-admission-plugins</code> takes a comma-delimited list of admission control plugins to be disabled, even if they are in the list of plugins enabled by default.</p>

<pre><code>kube-apiserver --disable-admission-plugins=StorageObjectInUseProtection
</code></pre>

<p>As a side note you can always patch a pvc after its created.</p>

<pre><code>kubectl patch pvc PVC_NAME -p '{"metadata":{"finalizers": []}}' --type=merge
</code></pre>
