Working with namespaces
This guide explores working with namespaces. It assumes that Epinio is installed; if you need to install, see install Epinio.
Like Kubernetes, Epinio has an idea of namespaces, and the means of working with them. Working with many namespaces is a little different in Epinio than with Kubernetes.
In Kubernetes the kubectl client accepts an option --namespace for all its commands, naming the namespace to work with. Epinio instead maintains a current namespace in its local state, often also called the targeted namespace. Commands that operate on a namespace use the current one.
There are a few points to note:
- The current namespace is local state, specific to the user invoking the Epinio client. The state information isn't shared between users.
- Creating a new namespace doesn't make it the current namespace.
- Deleting the current namespace doesn't undo the targeting. The removed namespace stays targeted and so the next commands fail.
- While installation of Epinio creates the pre-defined namespace
workspace, the Helm chart is not able to automatically target this namespace. The user must do this. This means whatever namespace was the last target in a preceding installation of Epinio continues to be the target in a new installation.
Working with namespaces
- UI
- CLI
UI walkthrough coming soon.
Once Epinio is deployed, check the existence of the pre-configured namespace workspace:
epinio namespace list
Output:
🚢 Listing namespaces
✔️ Epinio Namespaces:
| NAME | CREATED | APPLICATIONS | CONFIGURATIONS |
|-----------|-------------------------------|--------------|----------------|
| workspace | 2023-03-14 09:48:11 +0100 CET | | |
Create a new namespace:
epinio namespace create newnamespace
Output:
🚢 Creating namespace...
Name: newnamespace
✔️ Namespace created.
Inspect the details of a namespace (creation date, applications, configurations):
epinio namespace show newnamespace
Output:
🚢 Showing namespace...
Name: newnamespace
✔️ Details:
| KEY | VALUE |
|----------------|-------------------------------|
| Name | newnamespace |
| Created | 2023-03-14 15:27:48 +0100 CET |
| Applications | |
| Configurations | |
Epinio creates the default namespace workspace at installation time, and epinio login sets it as the current namespace. To see the current namespace, invoke the command without an argument:
epinio target
Output:
✔️
Currently targeted namespace: workspace
To target the namespace newnamespace for future Epinio operations:
epinio target newnamespace
Output:
🚢 Targeting namespace...
Name: newnamespace
✔️ Namespace targeted.
To start working with a different existing namespace, run epinio target again with its name. Finally, delete the namespace newnamespace:
epinio namespace delete newnamespace
Output:
You are about to delete namespace newnamespace and everything it includes, i.e. applications, configurations, etc. Are you sure? (y/n): y
🚢 Deleting namespace...
Name: newnamespace
✔️ Namespace deleted.
See also
- epinio namespace create - Creates an epinio-controlled namespace
- epinio namespace delete - Deletes an epinio-controlled namespace
- epinio namespace list - Lists all epinio-controlled namespaces
- epinio namespace show - Shows the details of an epinio-controlled namespace
- epinio target - Targets an epinio-controlled namespace