Containers and Services

Using containers and DuploCloud Services with AWS EKS and ECS

EKS/ECS support for containers and services

DuploCloud supports Elastic Kubernetes Service (EKS/ECS) out of the box.
Kubernetes clusters are created during Infrastructure setup using the Administrator -> Infrastructure option in the DuploCloud Portal. The cluster is created in the same Virtual Private Cloud (VPC) as the Infrastructure. Building an Infrastructure with an EKS/ECS cluster may take some time.
Next, you deploy an application within a Tenant in Kubernetes. The application contains a set of VMs, a Deployment set (Pods), and an application load balancer. Pods can be deployed either through the DuploCloud Portal or through kubectl,using HelmCharts.

DuploCloud Services and Containers

You can deploy native Docker containers in virtual machines (VMs) with the DuploCloud platform. Adding a Service in the DuploCloud Platform is not the same as adding a Kubernetes service.
Deploying DuploCloud Services implicitly converts Services into either a deployment set or a StatefulSet. If there are no volume mappings, then the service is mapped to a deployment set. Otherwise, it is mapped to a StatefulSet, which you can force creations of if needed. Most configuration values are self-explanatory, such as Images, Replicas, and Environmental Variables.

Advanced configurations with Kubernetes

You can supply advanced configuration options in the Other K8 Config field. The content of this field maps one-to-one with the Kubernetes API. Configurations for deployment are StatefulSets and are supported by placing the appropriate JSON code in the Other K8 Config section. For example, to reference Kubernetes Secrets using a YAML config map, create the following JSON code:
"Volumes": [
"name": "config-volume",
"configMap": {
"name": "game-config"
"VolumesMounts": [
"name": "config-volume",
"mountPath": "/etc/config"

Displaying Services

Once the deployment commands run successfully, click the Services tile on the Tenants page. Your deployments are displayed and you can now attach load balancers for the Services.
Tenants page with Services tile

Starting, stopping, and restarting multiple DuploCloud Services

Using the Services page, you can start, stop, and restart multiple services at one time.
  1. 1.
    In the DuploCloud Portal, navigate to DevOps -> Containers and select either EKS/Native or ECS.
  2. 2.
    Click the Services tab.
  3. 3.
    Use the checkbox column to select multiple services that you want to start or stop at once.
  4. 4.
    From the Service Actions menu, select Start Service, Stop Service, or Restart Service.
Your selected services are started, stopped, or restarted as you specified.
Services page with checkbox column (highlighted) and Service Actions menu
When you create a service, refer to the registry configuration in DevOps -> Containers -> EKS/Native | ECS -> Services, in the Configuration tab. Note the values in the Environment Variables and Other Docker Config fields.
For example:

Managing Docker, Kubernetes, and AWS configs and Secrets

See the Configs and Secrets section for information about creating and managing:
  • Docker Registry Credentials
  • Configuration and secrets in AWS
  • Passing Kubernetes ConfigMaps as Environment Variables (EVs) and files.

Downloading the Kubectl Token and KubeConfig

DuploCloud provides you with a Just-In-Time (JIT) security token, for fifteen minutes, to access the kubectl cluster.
  1. 1.
    In the DuploCloud Portal, select Administrator-> Infrastructure from the navigation pane.
  2. 2.
    Select the Infrastructure in the Name column.
  3. 3.
    Click the EKS tab.
  4. 4.
    Copy the temporary Token and the Server Endpoint (Kubernetes URL) Values from the Infrastructure that you created. You can also download the complete configuration by clicking the Download Kube Config button.
  5. 5.
    Run the following commands, locally:
> kubectl config --kubeconfig=config-demo set-cluster EKS_CLUSTER --server=[EKS_API_URL] --insecure-skip-tls-verify
> kubectl config --kubeconfig=config-demo set-credentials tempadmin --token=[TOKEN]
> kubectl config --kubeconfig=config-demo set-context EKS --cluster=EKS_CLUSTER --user=tempadmin --namespace=duploservices-[TENANTNAME]
> export KUBECONFIG=config-demo
> kubectl config use-context EKS
You have now configured kubectl to point and access the Kubernetes cluster. You can apply deployment templates by running the following command:
> kubectl apply -f nginx.yaml
apiVersion: apps/v1
kind: Deployment
name: nginx-deployment-g
app: nginx-deployment-g
replicas: 1
app: nginx-deployment-g
app: nginx-deployment-g
tenantname: "duploservices-stgeast1"
- name: nginx
image: nginx:latest
- containerPort: 80
If you need security tokens of a longer duration, create them on your own. Secure them outside of the DuploCloud environment.