-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(guides): document namespace migration (#8)
Signed-off-by: Hristo Hristov <[email protected]>
- Loading branch information
1 parent
c9af272
commit 4b70ebd
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
content/en/docs/guides/namespace-migration-across-tenants.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Namespace Migration Across Tenants | ||
weight: 2 | ||
description: "A Step-by-Step Guide to Namespace Migration" | ||
--- | ||
Capsule relays on two components to associate given namespace with tenant. | ||
- Namespace's OwnerReference.name pointing to the Tenant defintion | ||
- Namespace's OwnerReference.uid pointing to the Tenant defintion | ||
|
||
If a cluster administrator changes the Namespace by matching the other Tenant with the proper UID and name, the Namespace can be easily transferred. | ||
|
||
```bash | ||
kubectl get tenants | ||
``` | ||
``` | ||
NAME STATE NAMESPACE QUOTA NAMESPACE COUNT NODE SELECTOR AGE | ||
solar Active 1 46s | ||
wind Active 1 39s | ||
``` | ||
Get tenant's metadata.uid. | ||
```bash | ||
kubectl get tnt wind -o jsonpath='{.metadata.uid}' | ||
``` | ||
``` | ||
0df8e9ee-5f6f-40a4-897d-b80d349ca36f% | ||
``` | ||
While altering ownerReferences name is sufficient on its own, it's highly recommended to edit the UID to match the output of the previous commands. | ||
```bash | ||
kubectl edit ns ns-foo | ||
``` | ||
If everything is set correctly, the namespace will be correctly recognized as part of the new tenant. | ||
```bash | ||
kubectl get tenants | ||
``` | ||
``` | ||
NAME STATE NAMESPACE QUOTA NAMESPACE COUNT NODE SELECTOR AGE | ||
solar Active 0 2m22s | ||
wind Active 2 2m15s | ||
``` | ||
|