-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blog post for Provision volumes from cross namespace data sources #37628
Conversation
Welcome @ttakahashi21! |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Here's some early feedback that I hope is useful.
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
The following things are required to use cross namespace volume provisioning: | ||
|
||
* Enable the `CrossNamespaceVolumeDataSource` feature gate | ||
* Install a CRD for the specific `VolumeSnapShot controller` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Install a CRD for the specific `VolumeSnapShot controller` | |
* Install a CRD for the specific `VolumeSnapShot` controller |
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
```terminal | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml | ||
|
||
|
||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend linking to a specific commit, and not to the master branch. That keeps the hyperlink valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description has been removed. Because it changed to prerequisite work.
* Install the `VolumeSnapShot controller` itself | ||
* Install the `External Provisioner controller` itself | ||
* Install the `Container Stroge Interface Driver` itself | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do people also need to install the ReferenceGrant CRD from Gateway API?
volumeMode: Filesystem | ||
``` | ||
|
||
Note This is only the simplest example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note This is only the simplest example. | |
That is a simple example. For real world use, you might want to use a more complex approach. |
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
kubectl apply -f examples/csi-snapshot-v1beta1.yaml | ||
``` | ||
|
||
6. Ceate a ns1 namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6. Ceate a ns1 namespace | |
6. Create a new namespace named `ns1` |
5. Create StorageClass, PVC, and VolumeSnapshot by the examples in the csi-hostpath repo | ||
|
||
```terminal | ||
cd /tmp/csi-driver-host-path | ||
kubectl apply -f examples/csi-storageclass.yaml | ||
kubectl apply -f examples/csi-pvc.yaml | ||
kubectl apply -f examples/csi-snapshot-v1beta1.yaml | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid mentioning host path volumes? People use volume type even when it's not wise to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is possible. In that case, it is assumed that there is a CSI driver setup, snapshot, etc. The implementation procedure does not include prerequisite work. Is this alright with you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change hostpath
to example
then that's good for me. And then tell people they'll need to pick an actual storage driver if they want to follow along from home.
(aside: the text assumed that /tmp/csi-driver-host-path
contains manifests, which it usually doesn't, so we were already assuming that people had extra steps to take).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for advising. I decided not to write the description of CSI-Hostpath.
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
|
||
The following things are required to use cross namespace volume provisioning: | ||
|
||
* Enable the `CrossNamespaceVolumeDataSource` feature gate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to mention where exactly ( api server/kubelet/..etc)?
cd /tmp/csi-driver-host-path | ||
kubectl apply -f examples/csi-storageclass.yaml | ||
kubectl apply -f examples/csi-pvc.yaml | ||
kubectl apply -f examples/csi-snapshot-v1beta1.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use examples/csi-snapshot-v1.yaml
Hi @ttakahashi21 , v1.26 Comms Shadow here. This feature blog is on a feature tracked for release, the deadline for submitting a draft is the 29th of November, this should be considered the hard limit since we will need to review/edit/discuss the draft, so if at all possible it's better to submit it earlier to avoid any problems. Any doubts, we're here to help! |
content/en/blog/_posts/2022-12-6-provision-volumes-from-cross-namespace-snapshots-alpha.md
Outdated
Show resolved
Hide resolved
|
||
Kubernetes v1.26, released earlier this month, introduced an enable usage of provision of persisten volume claim from volume snapshot in other namespaces. | ||
Before Kubernetes v1.25, by using volume snapshots feature, users can provision volumes from snapshots. However, it only works for the `VolumeSnapshot` in the samme namespace, therefore users can't provision a persisten volume claim in one namespace from a `VolumeSnapshot` in other namespace. On the other hand, there are use cases that require to share the `VolumeSnapshot` across namespaces. | ||
To solve this problem,Kubernetes v1.26 includes a new API field called `dataSourceRef2`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this blog needs to be updated to reflect the changes in the implementation, i.e., it is dataSourceRef that is updated to include a namespace and there isn't a dataSourceRef2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Takafumi Takahashi (Hitachi Vantara) | ||
|
||
Kubernetes v1.26, released earlier this month, introduced an enable usage of provision of persisten volume claim from volume snapshot in other namespaces. | ||
Before Kubernetes v1.25, by using volume snapshots feature, users can provision volumes from snapshots. However, it only works for the `VolumeSnapshot` in the samme namespace, therefore users can't provision a persisten volume claim in one namespace from a `VolumeSnapshot` in other namespace. On the other hand, there are use cases that require to share the `VolumeSnapshot` across namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Before Kubernetes v1.25, by using volume snapshots feature, users can provision volumes from snapshots. However, it only works for the `VolumeSnapshot` in the samme namespace, therefore users can't provision a persisten volume claim in one namespace from a `VolumeSnapshot` in other namespace. On the other hand, there are use cases that require to share the `VolumeSnapshot` across namespaces. | |
Before Kubernetes v1.25, by using volume snapshots feature, users can provision volumes from snapshots. However, it only works for the `VolumeSnapshot` in the same namespace, therefore users can't provision a persisten volume claim in one namespace from a `VolumeSnapshot` in other namespace. On the other hand, there are use cases that require to share the `VolumeSnapshot` across namespaces. |
@@ -0,0 +1,133 @@ | |||
--- | |||
layout: blog | |||
title: "Kubernetes 1.26: alpha support for provision volumes from cross-namespace snapshots" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: "Kubernetes 1.26: alpha support for provision volumes from cross-namespace snapshots" | |
title: "Kubernetes v1.26: alpha support for provision volumes from cross-namespace snapshots" |
The enhancement proposal, | ||
[Provision volumes from cross-namespace snapshots](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3294-provision-volumes-from-cross-namespace-snapshots), includes lots of detail about the history and technical implementation of this feature. | ||
|
||
Please get involved by joining the Kubernetes storage SIG to help us enhance this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please get involved by joining the Kubernetes storage SIG to help us enhance this | |
Please get involved by joining the Kubernetes SIG Storage to help us enhance this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, “the Kubernetes storage SIG” is fine. Expanded out, it'd be “the Kubernetes storage special interest group” which is idiomatic.
/label tide/merge-method-squash |
/assign msau42 |
Hello, Comms Lead for v1.26 here: this Feature Blog PR is confirmed for the post-release Feature Blog series. We will add the publishing date in the next days. Thank you for your work! |
Hello, Comms Shadow for v1.26 here. The publication order and date for the Feature Blog series has been finalized and the tracking board updated (cf. kubernetes/sig-release#2105). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
Kubernetes v1.26, released earlier this month, introduced an enable the usage of | ||
cross namespace volume data source to allow you to specify a namespace | ||
in the `dataSourceRef` field of a PersistentVolumeClaim. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kubernetes v1.26, released earlier this month, introduced an enable the usage of | |
cross namespace volume data source to allow you to specify a namespace | |
in the `dataSourceRef` field of a PersistentVolumeClaim. | |
Kubernetes v1.26, released earlier this month, introduced an alpha feature that | |
lets you specify a data source for a PersistentVolumeClaim, even where the source | |
data belong to a different namespace. | |
With the new feature enabled, you specify a namespace in the `dataSourceRef` field of | |
a new PersistentVolumeClaim. Once Kubernetes checks that access is OK, the new | |
PersistentVolume can populate its data from the storage source specified in that other | |
namespace. | |
cross namespace volume data source to allow you to specify a namespace | ||
in the `dataSourceRef` field of a PersistentVolumeClaim. | ||
Before Kubernetes v1.26, by using `AnyVolumeDataSource` feature, | ||
users can provision volumes from data source in the same namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users can provision volumes from data source in the same namespace. | |
you could already provision new volumes from a data source in the **same** | |
namespace. |
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
namespace: prod | ||
volumeMode: Filesystem | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any summary here?
For example: “Kubernetes creates a PersistentVolume and the CSI driver populates it with data from the snapshot”.
Holding until the release day. |
@ttakahashi21 if you can go through the comments/suggestions above it would be great, with the release date being tomorrow we're doing our best to have feature blogs in a ready to publish state. Many thanks! |
3ce52d3
to
393ee17
Compare
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An important date fix, plus less critical other feedback.
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
|
||
The following things are required to use cross namespace volume provisioning: | ||
|
||
* Enable the `AnyVolumeDataSource` and `CrossNamespaceVolumeDataSource` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kube-apiserver and kube-controller-manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit)
* Enable the `AnyVolumeDataSource` and `CrossNamespaceVolumeDataSource` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kube-apiserver and kube-controller-manager | |
* Enable the `AnyVolumeDataSource` and `CrossNamespaceVolumeDataSource` [feature gates](/docs/reference/command-line-tools-reference/feature-gates/) for the kube-apiserver and kube-controller-manager |
content/en/blog/_posts/2022-12-6-cross-namespace-data-sources-alpha.md
Outdated
Show resolved
Hide resolved
393ee17
to
d65b755
Compare
The important bit that still needs attention is #37628 (comment) |
d65b755
to
d7a69f0
Compare
Thanks /lgtm |
LGTM label has been added. Git tree hash: cf79d15a0a569c9a07b2e58946b4aea75deff3f6
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/remove-label tide/merge-method-squash |
v1.26 was released and everything else is in place, removing hold. /unhold |
Add blog for Provision volumes from cross namespace data sources
■KEP
Please see CrossNamespaceVolumeDataSource
■API Change (Merge)
kubernetes/kubernetes#113186
■Controller (Under Review)
kubernetes-csi/external-provisioner#805