Skip to content

Deployment with Kubernetes

In this tutorial you will learn how to deploy an application created in the setup guide to Kubernetes using the Digital Ocean Managed Kubernetes clusters.


Setting up the WebSight CMS in Digital Ocean presented in this tutorial is not free. If you run the instance according to this guide, the costs will incur (~2$/day).


After finishing Creating and developing WebSight CMS project guide you should already have:

To complete this tutorial, you will additionally need:

Step 1: Digital Ocean configuration

Digital Ocean does not support persistent volumes with ReadWriteMany access mode. For simplicity sake, we create a single node Kubernetes cluster to work with ReadWiteOnce access mode.

  1. Authenticate doctl with an API token
    • API token scopes: Read and Write
  2. Create Kubernetes cluster using the Control Panel

    • scaling type: Fixed size
    • machine type: Basic nodes
    • node plan: Professional plans 8 GB RAM / 4 vCPUs
    • nodes: 1
  3. Configure kubectl context for the new cluster

  4. Create Container Registry
    • plan: Basic

Step 2: Kubernetes cluster configuration

  1. Set up Nginx Ingress Controller
  2. Integrate Container Registry with Kubernetes cluster

Step 2: Project configuration


  1. Update io.fabric8:docker-maven-plugin plugin configuration in distribution/pom.xml.
    • Add the following buildx extension to cms and nginx images <build> sections:
    • Add the following execution:
  2. Add <docker.skip.push>true</docker.skip.push> property to the main pom.xml.


  1. Create values.yml file in environment/k8s with the following content

            tag: latest
        replicas: 1
            tag: latest
        enabled: true
            cms: "cms.<YOUR_CLUSTER_IP>"
            site: "site.<YOUR_CLUSTER_IP>"
    - YOUR_REGISTRY_NAME - replace with Digital Ocean Container Registry name - YOUR_CLUSTER_IP - replace with Digital Ocean Load Balancer IP (you may obtain it by running doctl compute load-balancer list)

    See WebSight Helm chart documentation for more details.

Step 3: Build & deployment

  1. Configure Docker to push to and pull from Container Registry.
  2. In the project root run
    mvn clean install \
        -D<YOUR_REGISTRY_NAME>/cms \
        -D<YOUR_REGISTRY_NAME>/nginx \
        -D docker.skip.push=false
  3. Switch kubectl context to your cluster in Digital Ocean (kubectl config use-context <CONTEXT_NAME>)
  4. From environment/k8s run:
    helm repo add websight
    helm repo update websight
    helm install my-websight websight/websight-ce -f values.yml
    Use helm upgrade my-websight websight/websight-ce -f values.yml for updating the installation.

docker compose --project-name "websight-in-aws" up. It may take a couple of minutes to finish. 5. Route your domain to Application Load Balancer (that was created by the Docker Compose in the previous step) by creating a new Hosted Zone.

Step 4: Verification

  1. Check Kubernetes Dashboard and see if all PODs are running.
  2. Open WebSight CMS admin panel on https://cms.<YOUR_CLUSTER_IP> (SSL is not covered in this guide). Use the wsadmin/wsadmin to login.


  1. Delete Kubernetes cluster along with Load Balancer and volumes.
  2. Delete Container Registry.