After issuing the deploy command, the engineer monitored the build using the nkp describe cluster command and confirmed it completed successfully. However, a few hours later, after logging into the NKP UI, the engineer checked the code-green NKP workspace and saw that the NKP workload cluster was not there.
What is the likely reason the NKP workload cluster is not in the code-green NKP workspace?
Show answerHide answer
Correct answer: C The engineer did not supply the --namespace code-green parameter as part of the nkp create cluster vsphere command, therefore it was created in the default workspace and needs to be manually attached.
Explanation
ExplanationIn NKP, a workspace is a Kubernetes namespace on the management cluster that provides a logical boundary and access control for a set of resources, including workload clusters. When you create a workload cluster, you must explicitly specify which workspace (namespace) it belongs to.
Why Option C is Correct:
The scenario states that a code-green workspace was created, but the engineer used the generic nkp create cluster vsphere command. If the --namespace or -n flag is omitted, the NKP CLI will default to deploying the cluster in the default workspace. This explains why the cluster deployed successfully (as verified by nkp describe cluster) but is not visible in the intended code-green workspace in the UI. The cluster exists, but it's in the wrong logical container.
Why the Other Options are Incorrect:
A. The vSphere cluster cannot be displayed in the NKP UI unless its Kubernetes version is within ‘N - 1’ versions...
This is not a standard restriction for UI visibility. NKP can manage workload clusters with various supported Kubernetes versions, and the version disparity would more likely cause functional issues rather than simply hiding the cluster from the UI.
B. The vSphere service account credentials had expired...
Expired credentials would have prevented the cluster from being built successfully in the first place. The nkp describe cluster command confirmed the build was successful, meaning the credentials were valid at the time of deployment. Furthermore, credential expiration after the fact would typically not cause a cluster to vanish from the UI; it would more likely show it in an error state.
D. NKP vSphere clusters cannot be assigned NKP workspaces...
This is factually false. NKP workload clusters, regardless of the underlying infrastructure provider (vSphere, Nutanix, AWS, etc.), can and should be assigned to specific workspaces for proper multi-tenancy and organization. They are not forced into the default workspace.
Reference / Key Concept
This question tests the understanding of NKP Workspaces and Namespaces and the imperative use of the NKP CLI.
Workspace = Namespace:
In the context of the NKP management cluster, a "workspace" is implemented as a Kubernetes namespace. All NKP custom resources (like Clusters) for a given project must be created within that namespace.
Imperative CLI Requires Explicit Targeting:
When using imperative commands like nkp create cluster, you must explicitly tell the system where to place the resource using the --namespace flag. There is no automatic assignment based on the user's context in the UI.
Solution:
The engineer has two main options to resolve this:
Recreate the Cluster:
The most straightforward method is to delete the cluster from the default workspace and redeploy it with the correct --namespace code-green flag.
Move the Cluster (if supported):
In some cases, it might be possible to move the cluster's resources to the correct namespace, but this is a more advanced and less common operation. Recreation is typically the recommended path.
In summary, the most common reason for a successfully created resource not appearing in the expected UI location is that it was created in the wrong namespace due to a missing --namespace flag in the CLI command.