Skip to main content
Skip table of contents

Enable or Disable an App per Cluster

For clusters that are newly attached into the workspace, all Applications enabled for the Workspace are automatically enabled on and deployed to the new clusters. If you want to see on what clusters your application is currently deployed, follow the steps below.

Print and Review the Current State of an AppDeployment Resource

If you want to know how the AppDeployment resource is currently configured, use the commands below to print a table of the declared information. If the AppDeployment is configured for several clusters in a workspace, a column will display a list of the clusters.

Review all AppDeployments in a workspace

To review the state of the AppDeployment resource for a specific workspace, run the get command with the name of your workspace, as in this example:

CODE
dkp get appdeployments -w kommander-workspace

The output should contain a list of all your applications, here is an example:

CODE
NAME APP CLUSTERS
[...]
kube-oidc-proxy                 kube-oidc-proxy-0.3.2           host-cluster
kube-prometheus-stack           kube-prometheus-stack-46.8.0    host-cluster
kubecost                        kubecost-0.35.1                 host-cluster
[...]
Review a specific AppDeployment of an application in a workspace

To review the state of a specific AppDeployment of an application, run the get command with the name of the application and your workspace, as in this example:

CODE
dkp get appdeployment kube-prometheus-stack -w kommander-workspace

The output should look similar to this:

CODE
NAME APP CLUSTERS
kube-prometheus-stack kube-prometheus-stack-46.8.0 host-cluster

Deployment Scope

In a single-cluster environment with an Essential license, AppDeployments enable customizing any platform application.

In a multi-cluster environment with an Enterprise license, AppDeployments enable workspace-level, project-level, and per-cluster deployment and customization of workspace applications.

Define a Custom Configuration

Enable or Disable an Application per Cluster after it has been enabled at the workspace level. You can enable or disable applications at any time. After you have enabled the application at the workspace level, the spec.clusterSelector field populates.

Edit the AppDeployment YAML by adding or removing the names of the clusters where you want to enable your application in the clusterSelector section:

(info) The following snippet is an example. To customize, replace the following according to your requirements:

  • Application name

  • Version

  • Workspace name

  • Cluster names

See Components and Applications for the compatible versions.

CODE
cat <<EOF | kubectl apply -f -
apiVersion: apps.kommander.d2iq.io/v1alpha3
kind: AppDeployment
metadata:
  name: kube-prometheus-stack
  namespace: ${WORKSPACE_NAMESPACE}
spec:
  appRef:
    name: kube-prometheus-stack-46.8.0
    kind: ClusterApp
  clusterSelector:
    matchExpressions:
    - key: kommander.d2iq.io/cluster-name
      operator: In
      values:
      - attached-cluster1
      - attached-cluster3-new
EOF

Verify the Current Configuration of your Application

Connect to the Managed or Attached cluster and check the HelmReleases and status to verify the deployment:

CODE
kubectl get helmreleases -n ${WORKSPACE_NAMESPACE}

The output looks similar to this:

CODE
NAMESPACE               NAME               READY   STATUS                             AGE
workspace-test-vjsfq    kafka-operator     True    Release reconciliation succeeded   7m3s

Next Topic

Workspace Application per Cluster Enablement

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.