Set Docker registry credentials
In the DuploCloud Portal, navigate to Docker -> Services. Docker registry credentials are passed to the Kubernetes cluster as kubernetes.io/dockerconfigjson
.
Click Docker Credentials. The Set Docker registry Creds pane displays.
Supply the credentials and click Submit.
Enable the Docker Shell Service by clicking Enable Docker Shell.
You can pull images from multiple Docker registries by adding multiple Docker Registry Credentials.
In the DuploCloud Portal, click Administrator -> Plan. The Plans page displays.
Select the Plan in the Name column.
Click the Config tab.
Click Add. The Add Config pane displays.
See the Prerequisite section for details.
Using containers and DuploCloud Services with Azure AKS
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.
Containers and Services are critical elements of deploying AKS applications in the DuploCloud platform. Containers refer to Docker containers: lightweight, standalone packages that contain everything needed to run an application including the code, runtime, system tools, libraries, and settings. Services in DuploCloud are microservices defined by a name, Docker image, and a number of replicas. They can be configured with various optional parameters and are mapped to Kubernetes deployment sets or StatefulSets, depending on whether they have stateful volumes.
DuploCloud supports deploying containerized applications in Azure using AKS (Azure Kubernetes Service).
Azure Kubernetes Service (AKS) is a managed service on Microsoft Azure that uses Kubernetes to orchestrate containerized applications. AKS integrates seamlessly with other Azure services, providing a streamlined experience for deploying and scaling containers in the Azure ecosystem. While AKS demands a higher learning curve than Azure’s simpler container services, it allows users to leverage the extensive tools and flexibility of Kubernetes, offering robust scalability, customization, and portability across environments.
Adding a Service in the DuploCloud Platform is not the same as adding a Kubernetes service. When you deploy DuploCloud Services, the platform implicitly converts your DuploCloud Service into either a deployment set or a StatefulSet. The service is mapped to a deployment set if there are no volume mappings. Otherwise, it is mapped to a StatefulSet, which you can force creation of if needed. Most configuration values are self-explanatory, such as Images, Replicas, and Environmental Variables.
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 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.
When you create a service, refer to the registry configuration in Docker -> Services | Kubernetes -> Services. Select the Service from the NAME column and select the Configuration tab. Note the values in the Environment Variables and Other Docker Config fields.
For example:
{"DOCKER_REGISTRY_CREDENTIALS_NAME":"registry1"}
Creating and managing AKS Services and containers
For an end-to-end example of creating an AKS Service, see this .
In the DuploCloud Portal, navigate to Kubernetes -> Services.
Click Add. The Basic Options section of the Add Service page displays.
In the Service Name field, give the Service a name (without spaces).
From the Cloud list box, select Azure.
From the Platform list box, select AKS Linux.
In the Docker Image field, enter the Docker image.
Optionally, enter any allocation tags in the Allocation Tag field.
From the Replica Strategy list box, select a replication strategy. Refer to the informational ToolTip ( ) for more information.
Specify the number of replicas in the Replicas field (for Static replica strategy). The number of replicas you define must be less than or equal to the number of Hosts in the fleet.
In the Replica Placement list box (for Static or Horizontal Pod Autoscaler replication strategies) select First Available, Place on Different Hosts, Spread Across Zones, or Different Hosts and Spread Across Zones. Refer to the informational ToolTip ( ) for more information.
Optionally, enter variables in the Environmental Variables field.
In the Force StatefulSets list box, select Yes or No (for Static or Horizontal Pod Autoscaler replication strategies).
Optionally, select Tolerate spot instances (for Static or Horizontal Pod Autoscaler replication strategies)
Click Next. The Add Service, Advanced Options page displays.
Click Create. The Service is created.
From the DuploCloud Portal, navigate to Kubernetes -> Services. Select the Service from the NAME column. The Service details page displays.
Using the Services page, you can start, stop, and restart multiple services simultaneously.
In the DuploCloud Portal, navigate to Kubernetes -> Services.
Use the checkbox column to select multiple services you want to start or stop at once.
From the Service Actions menu, select Start Service, Stop Service, or Restart Service. The selected Services are started, stopped, or restarted as you specified.
In the DuploCloud Portal, you can display and manage the containers you have defined.
Select the Tenant from the Tenant list box in the upper left.
Navigate to Kubernetes -> Containers.
Configure advanced options as needed. For example, you can implement in the Other Container Config field (optional).
Select the Options Menu ( ) in each container row to display Logs, State, Container Shell, Host Shell, and Delete options.
Option | Functionality |
---|
Logs | Displays container logs. When you select this option, the Container Logs window displays. Use the Follow Logs option (enabled by default) to monitor logging in real-time for a running container. See the graphic below for an example of the Container Logs window. |
State | Displays container state configuration, in YAML code, in a separate window. |
Container Shell |
Host Shell | Accesses the Host Shell. |
Delete | Deletes the container. |
Accesses the Container Shell. To access the Container Shell option, you must first set up .
Configuration and Secret management in Azure
There are many ways to pass configurations to containers at run-time. Although simple to set up, using Environmental Variables can become complex if there are too many configurations, especially files and certificates. In Kubernetes, you also have the option to populate environment variables from Config Maps or Secrets.
DuploCloud Portal supports Azure Key Vault for secrets management.
In the Portal, navigate to Cloud Services -> Keyvault to add, store, and delete secrets.
See the Kubernetes Configs and Secrets section.