Overview
Search…
⌃K
Links

Containers

Adding Tenants, Hosts, and Services with EKS

Adding Tenants

Each tenant is mapped to a Namespace in Kubernetes. For example, if a Tenant is called Analytics in DuploCloud, the Kubernetes Namespace is called duploservices-analytics.
All application components within the Analytics Tenant are placed in the duploservices-analytics namespace. Since nodes cannot be part of a Kubernetes Namespace, DuploCloud creates a tenantname label for all the nodes that are launched within the Tenant. For example, a node launched in the Analytics Tenant is labeledtenantname: duploservices-analytics.
Any pods that are launched using the DuploCloud UI have an appropriate Kubernetes nodeSelector that ties the Pod to the nodes within the tenant. If you are deploying via kubectl,ensure that your deployment is using the proper nodeSelector.

Adding Hosts

Once the tenant is created, navigate to DevOps in the DuploCloud Portal and select the Tenant that you created from the Tenant list box.
Tenant list box in the DevOps section
In DevOps -> Hosts, create new nodes (Hosts).
Ensure that the value of Pool is set to Eks Linux, which is the default value.

Docker registry credentials and Kubernetes secrets

Set Docker registry credentials and Kubernetes secrets by selecting DevOps -> Containers -> EKS/Native from the navigation pane in the DuploCloud Portal and choosing the EKS/Native option. Docker registry credentials are passed to the Kubernetes cluster as kubernetes.io/dockerconfigjson. In addition, you can set and reference Kubernetes secrets in your deployment by configuring them with the EKS/Native option.

Adding Services

When you add a Service in the DuploCloud Platform, it is not the same as adding a Kubernetes service.
Deploying DuploCloud Services, by clicking the Add button in the EKS/Native tab, 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. 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"
}
]
}

Docker

You can deploy any native Docker container in a virtual machine (VM) with the DuploCloud platform.
  1. 1.
    In the DuploCloud Portal, select DevOps -> Containers -> EKS/Native from the navigation pane.
  2. 2.
    Click Add. The Add Service page displays.
  3. 3.
    Complete the fields on the page, including Service Name, Docker Image name, and number of Replicas. Use Allocation Tags to deploy the container in a specific set of hosts.
  4. 4.
    To force the creation of Kubernetes StatefulSets, select Yes in the Force StatefulSets field.
Do not use spaces when creating Service or Docker image names.
The number of Replicas that you define must be less than or equal to the number of hosts in the fleet.
Add Service page

Monitoring Kubernetes StatefulSets

Use the K8s Admin dashboard to monitor the number and availability of StatefulSets for your service.
  1. 1.
    In the DuploCloud Portal, select Administrator -> Diagnostics -> Metrics.
  2. 2.
    Click the k8s tab. The K8s Admin dashboard displays.
K8s Admin dashboard

Kubernetes cluster

Add multiple Docker Registry Credentials

DuploCloud provides support for pulling images from multiple docker registries.
Add multiple Docker Registry Credentials:
  1. 1.
    In the DuploCloud Portal, select Administrator-> Plan from the navigation pane. The Plans page displays.
  2. 2.
    Select the Plan in the Name column.
  3. 3.
    Click the Config tab.
  4. 4.
    Click Add. The Add Config pane displays.
Add Config pane
When you create a service, refer to the registry configuration in DevOps -> Containers -> EKS/Native -> Services, in the Configuration tab. Note the values in the Environment Variables and Other Docker Config fields.
For example:
{"DOCKER_REGISTRY_CREDENTIALS_NAME":"registry1"}

EKS/AKS support

DuploCloud supports Elastic Kubernetes Service (EKS/AKS) 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 AKS/EKS 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.

Kubectl token and config

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
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.

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

Load Balancers, Web Application Firewalls (WAFs), and other workflows

These do not need to be changed. See the following sections for more information:

Elastic Container Service (ECS) Fargate

Fargate is a technology that you can use with ECS to run containers without having to manage servers or clusters of EC2 instances.
For information about Fargate, contact the DuploCloud support team.