# How to Manage Kubernetes 1-Click Applications DigitalOcean Kubernetes (DOKS) is a Kubernetes service with a fully managed control plane, high availability, and autoscaling. DOKS integrates with standard Kubernetes toolchains and DigitalOcean’s load balancers, volumes, CPU and GPU Droplets, API, and CLI. [DigitalOcean Marketplace](https://marketplace.digitalocean.com/category/kubernetes) 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](https://helm.sh/docs/topics/charts/#helm) and require [Helm 3](https://helm.sh/) package manager to run. Other apps, such as Linkerd and Knative, use command-line tools or [operators](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/#operators-in-kubernetes). 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](https://github.com/digitalocean/marketplace-kubernetes/tree/master/stacks/). ## Installing 1-Click Apps You can install Kubernetes 1-Click Apps using either the [DigitalOcean Control Panel](#installing-via-control-panel) or the [command line](#installing-via-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](https://cloud.digitalocean.com/kubernetes/clusters), then click the **Marketplace** tab. Click **Install** to install one of the recommended apps or search for an app in the search field. Installing an app automatically executes the deployment script `deploy.sh`, which you can find in the corresponding app folder in the [GitHub repository](https://github.com/digitalocean/marketplace-kubernetes/tree/master/stacks). For example, the nginx deployment script executes `helm` commands and looks similar to the following: ```shell ... # 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: ```shell ... 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. ### 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: ```shell helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update ingress-nginx helm search repo ingress-nginx NGINX_CHART_VERSION="" helm install ingress-nginx ingress-nginx/ingress-nginx --version "$NGINX_CHART_VERSION" \ --namespace ingress-nginx \ --create-namespace \ -f ".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 1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI. 2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`. 3. Use the token to grant `doctl` access to your DigitalOcean account. ```shell doctl auth init ``` 4. Finally, run `doctl kubernetes 1-click install`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/kubernetes/1-click/install/index.html.md) for more details: ```shell doctl kubernetes 1-click install [flags] ``` The following example installs Loki and Netdata on a Kubernetes cluster with the ID `f81d4fae-7dec-11d0-a765-00a0c91e6bf6`: ```shell 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=` command. For example: ```shell 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: ```shell 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](https://helm.sh/docs/chart_template_guide/values_files) in the `values.yml` file for the corresponding app in the [GitHub repository](https://github.com/digitalocean/marketplace-kubernetes/tree/master/stacks). To see the values you can customize, run the [`helm show values`](https://helm.sh/docs/helm/helm_show_values/) command. For example: ```shell 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`](https://helm.sh/docs/helm/helm_upgrade/) command to upgrade the chart to use the new values. For example: ```shell 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: ```shell helm upgrade ingress-nginx ingress-nginx/ingress-nginx \ --version \ --namespace ingress-nginx \ ``` In this example for upgrading the Linkerd control plane, you use the `linkerd upgrade` command: ```shell 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: ```shell helm uninstall -n kubectl delete ns ``` The [`helm uninstall`](https://helm.sh/docs/helm/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: ```shell linkerd viz uninstall | kubectl delete -f - linkerd uninstall | kubectl delete -f - ``` See the app’s page on DigitalOcean Marketplace for more uninstallation steps.