Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/scw/testdata/test-all-usage-k8s-cluster-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ AVAILABLE COMMANDS:
list List Clusters
list-available-types List available cluster types for a cluster
list-available-versions List available versions for a Cluster
migrate-to-sbs-csi Migrate a cluster to SBS CSI
reset-admin-token Reset the admin token of a Cluster
set-type Change the Cluster type
update Update a Cluster
Expand Down
32 changes: 0 additions & 32 deletions docs/commands/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ This API allows you to manage Kubernetes Kapsule and Kosmos clusters.
- [List Clusters](#list-clusters)
- [List available cluster types for a cluster](#list-available-cluster-types-for-a-cluster)
- [List available versions for a Cluster](#list-available-versions-for-a-cluster)
- [Migrate a cluster to SBS CSI](#migrate-a-cluster-to-sbs-csi)
- [Reset the admin token of a Cluster](#reset-the-admin-token-of-a-cluster)
- [Change the Cluster type](#change-the-cluster-type)
- [Update a Cluster](#update-a-cluster)
Expand Down Expand Up @@ -399,37 +398,6 @@ scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111



### Migrate a cluster to SBS CSI

Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
Make sure to have the necessary Quota before running this command.

**Usage:**

```
scw k8s cluster migrate-to-sbs-csi <cluster-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| cluster-id | Required | Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


**Examples:**


Migrate a cluster to SBS CSI
```
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111
```




### Reset the admin token of a Cluster

Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57 h1:4whrhv1ujBRUmqKPPg/qe6LoweqTNYx7TLdgPUaQzM4=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57/go.mod h1:w4o02EHpO0CBGy2nehzWRaFQKd62G9HIf+Q07PDaUcE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec h1:XLNQFZzigDYXgdRHPxuV3w5VnKvnsCVbl8HBpvDYu40=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec/go.mod h1:w4o02EHpO0CBGy2nehzWRaFQKd62G9HIf+Q07PDaUcE=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
42 changes: 0 additions & 42 deletions internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func GetGeneratedCommands() *core.Commands {
k8sClusterListAvailableVersions(),
k8sClusterListAvailableTypes(),
k8sClusterResetAdminToken(),
k8sClusterMigrateToSbsCsi(),
k8sACLList(),
k8sACLAdd(),
k8sACLSet(),
Expand Down Expand Up @@ -1309,47 +1308,6 @@ func k8sClusterResetAdminToken() *core.Command {
}
}

func k8sClusterMigrateToSbsCsi() *core.Command {
return &core.Command{
Short: `Migrate a cluster to SBS CSI`,
Long: `Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
Make sure to have the necessary Quota before running this command.`,
Namespace: "k8s",
Resource: "cluster",
Verb: "migrate-to-sbs-csi",
// Deprecated: false,
ArgsType: reflect.TypeOf(k8s.MigrateClusterToSBSCSIRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "cluster-id",
Short: `Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled`,
Required: true,
Deprecated: false,
Positional: true,
},
core.RegionArgSpec(
scw.RegionFrPar,
scw.RegionNlAms,
scw.RegionPlWaw,
),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
request := args.(*k8s.MigrateClusterToSBSCSIRequest)

client := core.ExtractClient(ctx)
api := k8s.NewAPI(client)

return api.MigrateClusterToSBSCSI(request)
},
Examples: []*core.Example{
{
Short: "Migrate a cluster to SBS CSI",
Raw: `scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111`,
},
},
}
}

func k8sACLList() *core.Command {
return &core.Command{
Short: `List ACLs`,
Expand Down
Loading