Containers and Services
Using containers and DuploCloud Services with AWS EKS and ECS
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.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.
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"
}
]
}
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
Using the Services page, you can start, stop, and restart multiple services at one time.
- 1.In the DuploCloud Portal, navigate to DevOps -> Containers and select either EKS/Native or ECS.
- 2.Click the Services tab.
- 3.Use the checkbox column to select multiple services that you want to start or stop at once.
- 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:
{"DOCKER_REGISTRY_CREDENTIALS_NAME":"registry1"}
- Docker Registry Credentials
- Configuration and secrets in AWS
- Passing Kubernetes ConfigMaps as Environment Variables (EVs) and files.
DuploCloud provides you with a Just-In-Time (JIT) security token, for fifteen minutes, to access the
kubectl
cluster. - 1.In the DuploCloud Portal, select Administrator-> Infrastructure from the navigation pane.
- 2.Select the Infrastructure in the Name column.
- 3.Click the EKS tab.
- 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.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
nginx.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment-g
labels:
app: nginx-deployment-g
spec:
replicas: 1
selector:
matchLabels:
app: nginx-deployment-g
template:
metadata:
labels:
app: nginx-deployment-g
spec:
nodeSelector:
tenantname: "duploservices-stgeast1"
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
If you need security tokens of a longer duration, create them on your own. Secure them outside of the DuploCloud environment.
Last modified 7h ago