failed to create snapshot in k8s 1.20
aboje opened this issue · 5 comments
We recently upgraded to k8s 1.20. I am having troubles creating volumesnapshots. Here is the error:
spec:
snapshotClassName: pure-snapshotclass
snapshotContentName: ""
source:
apiGroup: null
kind: PersistentVolumeClaim
name: pvc-nginx
status:
creationTime: "2021-04-05T13:22:48Z"
error:
message: 'Failed to create snapshot: selfLink was empty, can''t make reference'
time: "2021-04-05T13:23:11Z"
readyToUse: false
restoreSize: null
I am using snapshot.storage.k8s.io/v1alpha1, which is still included in k8s 1.20.
$ kubectl api-versions | grep snap
snapshot.storage.k8s.io/v1alpha1
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-31T15:33:39Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-31T16:42:32Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
We are using: image: purestorage/k8s:5.2.0
It looks like this issue is referenced here, but I'm not sure how that helps us. Is an upgrade to PSO 6.x required?
kubernetes/kubernetes#94660
If it is true that we need to be on PSO 6.x, does PSO 5.x have any statement that it is incompatible with k8s 1.20?
PSO 5.x only supports the k8s alpha snapshot API. This was changed to the beta API from Kubernetes 1.17.
We will add a note to state this
Isn't that still available in k8s 1.20?
$ kubectl api-versions | grep snap
snapshot.storage.k8s.io/v1alpha1
That is interesting - Our understanding was that alpha APIs got dropping after n+2 from deprecation.
We have not tested PSO 5.x with k8s 1.20 as we only support this to k8s 1.17.
As noted the issue you see is fixed in the v2+ snapshotter which is used by PSO 6.
The upgrade process for PSO 5.2 to PSO 6.1 is detailed here.
Ok, I will start that process.