Failed to get secret [px-pure-secret]. Err: secrets "px-pure-secret" not found

Hello, I get the error

Failed to get secret [px-pure-secret]. Err: secrets “px-pure-secret” not found

when I describe my storageclass, however the secret is created. This seems like a chicken and egg issue. Any ideas on how to resolve?

kubectl get secret -n kube-system px-pure-secret

NAME TYPE DATA AGE
px-pure-secret Opaque 1 3m7s

Likely, you are using no namespace with describe. Can you provide the complete command - replace get with describe (the one you provided, check if that works).

kubectl describe storageclass mysql-nfs-v1
Name: mysql-nfs-v1
IsDefaultClass: No
Annotations: kubectl.kubernetes.io/last-applied-configuration={“allowVolumeExpansion”:true,“apiVersion”:“storage.k8s.io/v1”,“kind”:“StorageClass”,“metadata”:{“annotations”:{},“name”:“mysql-nfs-v1”},“parameters”:{“backend”:“pure_file”,“pure_export_rules”:“*(rw)”,“repl”:“1”},“provisioner”:“kubernetes.io/portworx-volume”}

Provisioner: kubernetes.io/portworx-volume
Parameters: backend=pure_file,pure_export_rules=*(rw),repl=1
AllowVolumeExpansion: True
MountOptions:
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events:

kubectl describe secrets -n kube-system px-pure-secret
Name: px-pure-secret
Namespace: kube-system
Labels:
Annotations:

Type: Opaque

Data

pure.json: 358 bytes

This is the output when I describe my storageclass and my secret. Please let me know if there is something else you are looking for.

Thanks

I was able to get my cluster to pick the secret up by running this command

kubectl label nodes --all px/service=restart --overwrite

My issue is now resolved.

1 Like