All pages
Powered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

AKS Containers and Services

Creating and managing AKS Services and containers

For an end-to-end example of creating an AKS Service, see this tutorial.

Creating a DuploCloud AKS Service

  1. In the DuploCloud Portal, navigate to Kubernetes -> Services.

  2. Click Add. The Basic Options section of the Add Service page displays.

  3. In the Service Name field, give the Service a name (without spaces).

  4. From the Cloud list box, select Azure.

  5. From the Platform list box, select AKS Linux.

  6. In the Docker Image field, enter the Docker image.

  7. Optionally, enter any allocation tags in the Allocation Tag field.

  8. From the Replica Strategy list box, select a replication strategy. Refer to the informational ToolTip ( ) for more information.

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

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

  11. Optionally, enter variables in the Environmental Variables field.

  12. In the Force StatefulSets list box, select Yes or No (for Static or Horizontal Pod Autoscaler replication strategies).

  13. Optionally, select Tolerate spot instances (for Static or Horizontal Pod Autoscaler replication strategies)

  1. Click Next. The Add Service, Advanced Options page displays.

  2. Configure advanced options as needed. For example, you can implement in the Other Container Config field (optional).

  3. Click Create. The Service is created.

Viewing Services

  1. From the DuploCloud Portal, navigate to Kubernetes -> Services. Select the Service from the NAME column. The Service details page displays.

Starting, Stopping, and Restarting Multiple DuploCloud Services

Using the Services page, you can start, stop, and restart multiple services simultaneously.

  1. In the DuploCloud Portal, navigate to Kubernetes -> Services.

  2. Use the checkbox column to select multiple services you want to start or stop at once.

  3. From the Service Actions menu, select Start Service, Stop Service, or Restart Service. The selected Services are started, stopped, or restarted as you specified.

Managing Kubernetes Containers

In the DuploCloud Portal, you can display and manage the containers you have defined.

  1. Select the Tenant from the Tenant list box in the upper left.

  2. Navigate to Kubernetes -> Containers.

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

Accesses the Container Shell. To access the Container Shell option, you must first set up Shell access for Docker.

Host Shell

Accesses the Host Shell.

Delete

Deletes the container.

Kubernetes Lifecycle Hooks
The Add Service, Basic Options page
The Services details page
The Kubernetes Services page
The Containers page with menu highlighted

Allocation Tagging

Pin a container to a set of hosts using allocation tagging

In DuploCloud, allocation tags give you control over where containers and Services are deployed within a Kubernetes cluster. By default, DuploCloud spreads container replicas across available Hosts to balance resource usage. Allocation tags allow you to label Hosts and Services with specific characteristics, capabilities, or preferences, and to "pin" Services to certain Hosts to meet your operational and resource needs. Allocation tags are useful for deployment requirements like using Hosts with specialized resources, meeting compliance standards, or isolating workloads.

For a Service to run on a specific Host, the Host and the Service must have matching allocation tags. Services without allocation tags are deployed on any available Host in the Kubernetes cluster.

Allocation Tag Rules

Before you assign an allocation tag, review the following:

For Docker-based Services, tag matching is substring-based and case-insensitive. This means a Service tag only needs to appear as part of a Host tag, regardless of case. For example, a Host tagged HighCpu;HighMem would match a Service tagged highcpu, but not one tagged highcpu;gpu unless both substrings are included in the Host tag.

In contrast, Kubernetes-based Services use exact and case-sensitive tag matching. The tag on the Service must exactly match the tag on the Host or Node Pool, including case and spelling. For example, a Service tagged gpu.large would match a Host tagged gpu.large, but not Gpu.Large or gpu-large.

Kubernetes tags also have character restrictions:

  • Tags must start and end with an alphanumeric character.

  • Allowed characters: letters, numbers, hyphens (-), and periods (.).

Notes:

  • If a Service does not have any allocation tag, it may be placed on any Host.

  • Hosts tagged with specific values can still run untagged Services. For exclusive placement, make sure that every Service in the Tenant has at least one allocation tag.

Adding an Allocation Tag to a Host

Assign a tag describing the Host's characteristics or capabilities, such as resource capacity, geographic location, or compliance needs.

  1. In the DuploCloud Portal, navigate to Cloud Services -> Hosts. The Hosts page displays.

  2. Select the Host from the NAME column. If the Host is part of an Auto-Scaling Group (ASG), select the ASG tab and select the correct ASG.

  3. Click the Allocation Tag Edit Icon ( ). The Set Allocation Tag pane displays.

  1. In the Allocation Tag field, enter a tag name following the .

  2. Click Set. The allocation tag you set displays in the heading banner for the Host or ASG.

Assigning an Allocation Tag to a Service

In the DuploCloud Portal, navigate to the Add Service or Edit Service page, and enter a tag name in the Allocation Tag field. See the for character restrictions and tag matching details. When the Service runs, DuploCloud will attempt to select a Host with a matching allocation tag. To pin the Service to run on a specific Host, apply matching allocation tags to the Host and Service.

Editing or deleting an Allocation Tag

On the Host or ASG page, select the Metadata tab, and edit or delete the existing allocation tag.

Container Rollback

Roll back a container image for Kubernetes or Docker Services

Container Rollback in DuploCloud allows users to quickly revert a Kubernetes or Docker Service's container image to a previous, stable version. This is especially useful in scenarios where a newly deployed container image introduces issues, errors, or failures in the application. With this feature, users can ensure minimal downtime and maintain the stability of their Services by rolling back to a known good state. Container rollback is support for:

  • Kubernetes (on EKS, AKS, GKE, and DuploCloud Kubernetes)

  • Docker Services

Passing Configs and Secrets

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

There are several methods for passing configurations to containers during runtime:.

  1. Environment Variables: A simple method for passing configuration data, but it can become cumbersome when dealing with many configurations or sensitive data like certificates and keys.

  2. ConfigMaps and Secrets in Kubernetes: For more structured management of configuration data, Kubernetes offers ConfigMaps for non-sensitive data and Secrets for sensitive data (e.g., passwords, tokens). These can be injected into containers at runtime, providing a cleaner and more secure way to manage configurations.

  • Learn more about using ConfigMaps and Secrets in Kubernetes.

  • Azure Key Vault: For Azure users, Azure Key Vault is an option to securely store and manage sensitive configurations and secrets outside of your application, reducing the complexity of handling sensitive data.

    • Learn more about Azure Key Vault for secrets management.

  • Config Maps
    Secrets
    allocation tag rules
    allocation tag rules
    The heading banner for an Auto-Scaling Group (ASG) with an allocation tag
    Rolling back a container image
    1. Select the appropriate Tenant from the Tenant list box.

    2. Navigate to Kubernetes -> Services or Docker -> Services.

    3. In the NAME column, select the service you want to roll back.

    4. From the Actions menu, choose Rollback. The Rollback Container Image pane will appear.

    5. In the Image list box, select the version of the container image you want to roll back to.

    6. Click Rollback to revert the service to the selected image.

    Disabling container image history tracking

    1. Navigate to Admin -> System Settings.

    2. Select the System Config tab and click Add. The Add Config pane displays.

    3. For Config Type, select Flags.

    4. In the Key list box, select Disable Container Image History Tracking.

    5. Set the Value to True to disable image history tracking (default is False).

    6. Click Submit. The setting is saved.

    The Add Config pane configured to disable container image history tracking

    Docker Registry Credentials

    Set Docker registry credentials

    Set Docker Registry Credentials and Kubernetes Secrets

    1. In the DuploCloud Portal, navigate to Docker -> Services. Docker registry credentials are passed to the Kubernetes cluster as kubernetes.io/dockerconfigjson.

    2. Click Docker Credentials. The Set Docker registry Creds pane displays.

    3. Supply the credentials and click Submit.

    4. Enable the Docker Shell Service by clicking Enable Docker Shell.

    Add multiple Docker Registry Credentials

    You can pull images from multiple Docker registries by adding multiple Docker Registry Credentials.

    1. In the DuploCloud Portal, click Administrator -> Plan. The Plans page displays.

    2. Select the Plan in the Name column.

    3. Click the Config tab.

    Access Kubernetes ConfigMaps using file and Environment Variables (EVs)

    See the for details.

    Click Add. The Add Config pane displays.
    Prerequisite section
    Add Config pane

    Containers and Services

    Using containers and DuploCloud Services with Azure AKS

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

    DuploCloud Services and Containers

    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.

    Container Orchestration

    DuploCloud supports deploying containerized applications in Azure using AKS (Azure Kubernetes Service).

    AKS

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

    Kubernetes

    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"}

    Azure Kubernetes Service