Part 2: Manage
This is Part 2 of the exercise that will focus on managing namespaces that were created outside of the controller.
What Will You Do¶
In part 2, you will:
- Update the cluster blueprint with namespace syncronization
- Apply the blueprint to a cluster
- Manage namespaces from KUBECTL
- Manage namespaces from controller
Step 1: Update Blueprint¶
In this step, we will create a new version for our previously created blueprint.
- Navigate to the project in your Org where your blueprint is located
- Select Infrastructure -> Blueprints
- Click on the existing blueprint
- Click "New Version"
- Enter the "Version Name"
- Select "Enable Namespace Sync" for the Namespace Configuration
- Click "Save Changes"
You will now see the new version.
Step 2: Apply Blueprint¶
In this step, we will apply the new blueprint version to the cluster.
- Navigate to the project in your Org where the cluster is located.
- Select Infrastructure -> Clusters
- Click the gear icon on the cluster card
- Select "Update Blueprint"
- Select the previosuly created blueprint
- Select the latest blueprint version
- Click "Save and Publish"
The blueprint version will begin to be applied to the cluster.
The updated blueprint version is now applied to the cluster.
Step 3: Manage Namespaces from KUBECTL¶
In this step, we will attempt to remove the previously created namespaces from the cluster by using KUBECTL.
First, we will verify that both of the previously created namespaces are syncronized and managed by the controller.
- Navigate to the project in your Org where the cluster is located.
- Select Infrastructure -> Namespaces
Next, we will attempt to delete the namespaces through KUBECTL.
- Navigate to the project in your Org where the cluster is located.
- Select Infrastructure -> Clusters
- Click "Kubectl" on the cluster card
- Enter the following command (Note, update the name of the namespace with the namespace you previously created)
kubectl delete namespaces kubectl-ns
You will see that the namespace cannot be deleted outside of the controller now that it is managed by the controller.
Step 4: Manage Namespaces from Controller¶
In this step, we will attempt to remove the previously created namespaces through the controller.
- Navigate to the project in your Org where the cluster is located.
- Select Infrastructure -> Namespaces
- Click the delete icon next to the "kubectl-ns".
- Click "Yes" to confirm the namespace deletion
You will see that the namespace has been removed from the controller.
- Navigate to the project in your Org where the cluster is located.
- Select Infrastructure -> Clusters
- Click "Kubectl" on the cluster card
- Enter the following command
kubectl get namespaces
You will see that the namespace has been removed from the cluster
Recap¶
Congratulations! You have successfully setup a cluster blueprint with namespace syncronization and managed namespaces that were created outside of the controller.