How to Manage Kubernetes 1-Click Applications

DigitalOcean Kubernetes (DOKS) is a managed Kubernetes service that lets you deploy Kubernetes clusters without the complexities of handling the control plane and containerized infrastructure. Clusters are compatible with standard Kubernetes toolchains, integrate natively with DigitalOcean Load Balancers and volumes, and can be managed programmatically using the API and command line. For critical workloads, add the high-availability control plane to increase uptime with 99.95% SLA.


DigitalOcean Marketplace provides a variety of apps and stacks that you can install to run pre-configured container images on Kubernetes clusters. You can install these apps directly to a new or existing Kubernetes cluster.

Most Kubernetes 1-Click Apps are Helm charts and require Helm 3 package manager to run. Other apps, such as Linkerd and Knative, use command-line tools or operators. For Helm charts, you must install Helm before you can run these apps and also use various helm commands to customize the app.

You can find the corresponding stack for every 1-Click App in the DigitalOcean Marketplace GitHub repo.

Installing 1-Click Apps

You can install Kubernetes 1-Click Apps using either the DigitalOcean Control Panel or the command line.

Installing via Control Panel

To install an app using the DigitalOcean Control Panel, navigate to your cluster in the Kubernetes section of the control panel, then click on the Marketplace tab. Click Install to install one of the recommended apps or search for an app in the search field.

Empty Add-ons tab

Installing an app automatically executes the deployment script deploy.sh, which you can find in the corresponding app folder in the GitHub repository. For example, the nginx deployment script executes helm commands and looks similar to the following:

...
# Add the repo.
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update > /dev/null

# Create the chart.
STACK="ingress-nginx"
CHART="ingress-nginx/ingress-nginx"
CHART_VERSION="4.0.13"
NAMESPACE="ingress-nginx"
if [ -z "${MP_KUBERNETES}" ]; then
  # Use local version of values.yml.
  ROOT_DIR=$(git rev-parse --show-toplevel)
  values="$ROOT_DIR/stacks/ingress-nginx/values.yml"
else
  # Use GitHub-hosted master version of values.yml.
  values="https://raw.githubusercontent.com/digitalocean/marketplace-kubernetes/master/stacks/ingress-nginx/values.yml"
fi

# Install the chart. A timeout of 10m is needed so that DigitalOcean load balancers can spin up.
helm upgrade "$STACK" "$CHART" \
  --atomic \
  --create-namespace \
  --install \
  --namespace "$NAMESPACE" \
  --values "$values" \
  --version "$CHART_VERSION" \
  --timeout 10m0s

Some apps use the vendor-recommended tooling for installation. For example, the Linkerd deployment script uses linkerd commands to install the app and looks similar to the following:

...
LINKERD2_VERSION="stable-2.11.0"
TMP_DIR=$(mktemp -d)

# Determine operating system.
if [ "$(uname -s)" = "Darwin" ]; then
  OS=darwin
else
  OS=linux-amd64
fi

FILENAME="linkerd2-cli-$LINKERD2_VERSION-$OS"
URL="https://github.com/linkerd/linkerd2/releases/download/$LINKERD2_VERSION/$FILENAME"
BINARY="$TMP_DIR/$FILENAME"

# Download Linkerd.
wget -q $URL -O "$BINARY" && chmod +x "$BINARY"

# Set kubectl namespace.
kubectl config set-context --current --namespace=linkerd

# Deploy linkerd.
$BINARY install --ignore-cluster | kubectl apply -f -

# Ensure services are running.
kubectl get deployments -o custom-columns=NAME:.metadata.name | tail -n +2 | while read -r line
do
  kubectl rollout status -w deployment/"$line"
done

# Install the viz extension
$BINARY viz install | kubectl apply -f -
...
Note
You cannot access the installation logs. If an installation fails, changes are reverted.

The installed app appears in the History of Installed 1-Click Apps section of the tab.

History of 1-Click Apps

Installing via Command Line Using Helm

To install a Helm chart using the command line, run the helm repo add, helm repo update, and helm install commands. For example, run the following commands to install Ingress-NGINX:

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update ingress-nginx
helm search repo ingress-nginx
NGINX_CHART_VERSION="<chart-version>"
helm install ingress-nginx ingress-nginx/ingress-nginx --version "$NGINX_CHART_VERSION" \
  --namespace ingress-nginx \
  --create-namespace \
  -f "<path-to-values-file>.yml"

For more installation instructions, refer to the app’s page on DigitalOcean Marketplace.

Install via doctl

How to install 1-click apps using the DigitalOcean CLI

To install 1-click apps via the command-line, follow these steps:

  1. Install doctl, the DigitalOcean command-line tool.

  2. Create a personal access token, and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

                  doctl auth init
                
  4. Finally, install 1-click apps with doctl kubernetes 1-click install. The basic usage looks like this, but you'll want to read the usage docs for more details:

                  doctl kubernetes 1-click install <cluster-id> [flags]
                

    The following example installs Loki and Netdata on a Kubernetes cluster with the ID f81d4fae-7dec-11d0-a765-00a0c91e6bf6

                   doctl kubernetes 1-click install f81d4fae-7dec-11d0-a765-00a0c91e6bf6> --1-clicks loki,netdata
                

Verifying the Installation

You can verify that the pods are up and running by using the kubectl get pods --all-namespaces app.kubernetes.io/name=<app-name> command. For example:

kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx

All pods should be in a READY state with a STATUS of Running as shown in the following example:

NAMESPACE       NAME                                        READY   STATUS    RESTARTS   AGE
ingress-nginx   ingress-nginx-controller-664d8d6d67-6x4dd   1/1     Running   0          3m
ingress-nginx   ingress-nginx-controller-664d8d6d67-khm5x   1/1     Running   0          3m

Once the installation is complete, see the app’s page on DigitalOcean Marketplace for directions on how to use it.

Customizing and Upgrading 1-Click Apps

The steps to customize and upgrade an app can vary depending on the app. For Helm charts, you can customize the default values in the values.yml file for the corresponding app in the GitHub repository. To see the values you can customize, run the helm show values command. For example:

helm show values ingress-nginx/ingress-nginx --version 4.0.13

You can then specify new values in the values.yml file and run the helm upgrade command to upgrade the chart to use the new values. For example:

helm upgrade ingress-nginx ingress-nginx/ingress-nginx --version 4.0.13 \
  --namespace ingress-nginx \
  --values values.yml

You can also run the helm upgrade command to upgrade the entire stack to the latest release. For example:

helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
  --version <INGRESS_NGINX_STACK_NEW_VERSION> \
  --namespace ingress-nginx \

In this example for upgrading the Linkerd control plane, you use the linkerd upgrade command:

linkerd upgrade | kubectl apply --prune -l linkerd.io/control-plane-ns=linkerd -f -
linkerd upgrade | kubectl apply --prune -l linkerd.io/control-plane-ns=linkerd \
  --prune-whitelist=rbac.authorization.k8s.io/v1/clusterrole \
  --prune-whitelist=rbac.authorization.k8s.io/v1/clusterrolebinding \
  --prune-whitelist=apiregistration.k8s.io/v1/apiservice -f -

For more customization instructions, refer to the app’s page on DigitalOcean Marketplace.

Uninstalling 1-Click Apps

The steps to uninstall an app can vary depending on the app. For example, to uninstall a Helm chart, run the following commands:

helm uninstall <app-name> -n <namespace>
kubectl delete ns <namespace>

The helm uninstall command deletes your app installation and the kubectl delete ns command deletes the associated namespace.

Here is another example that shows how to uninstall Linkerd. You need to first remove any data plane proxies and extensions followed by the control plane:

linkerd viz uninstall | kubectl delete -f -
linkerd uninstall | kubectl delete -f -

See the app’s page on DigitalOcean Marketplace for more uninstallation steps.