EKS Containers and Services
Managing Containers and Service with EKS and Native Docker Services
For an end-to-end example of creating an EKS Service, see this tutorial.
For a Native Docker Services example, see this tutorial.
Services
Using the Services tab in the DuploCloud Portal (Kubernetes -> Services), you can display and manage the Services you have defined.
For EKS Services, select the Service Name and click the Actions menu to Edit or Delete Services, in addition to performing other actions, as shown below.
Adding a DuploCloud EKS Service
In the DuploCloud Portal, navigate to Kubernetes -> Services for an EKS Service.
Click Add. The Basic Options section of the Add Service page displays.
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.
To force the creation of Kubernetes StatefulSets, select Yes in the Force StatefulSets field.
Click Next. The Advanced Options section of the Add Service page displays.
Configure advanced options as needed. For example, you can implement Kubernetes Lifecycle Hooks, by adding the YAML to the Other Container Config field (optional).
Click Create. The Service is created.
Do not use spaces when creating Service or Docker image names.
The number of Replicas you define must be less than or equal to the number of hosts in the fleet.
Displaying Services
Once the deployment commands run successfully, navigate to Administrator -> Tenants. Select the Tenant from the NAME column. Your deployments are displayed and you can now attach load balancers for the Services.
Starting, stopping, and restarting multiple DuploCloud Services
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.
Your selected services are started, stopped, or restarted as you specified.
Importing a Native Kubernetes Service
Using the Import Kubernetes Deployment pane, you can add a Service to an existing Kubernetes namespace using Kubernetes YAML.
In the DuploCloud Portal, select Kubernetes -> Services from the navigation pane.
Click Add. The Add Service page displays.
Click the Import Kubernetes Deployment button in the upper right. The Import Kubernetes Deployment pane displays.
Paste the deployment YAML code, as in the example below, into the Import Kubernetes Deployment pane.
Click Import.
In the Add Service page, click Next.
Click Create. Your Native Kubernetes Service is created.
Advanced configurations with EKS
You can supply advanced configuration options with EKS in the DuploCloud Portal in several ways, including the advanced use cases in this section.
Enable DuploCloud Master IP access to an EKS Security Group
In the DuploCloud Portal, navigate to Administrator -> System Settings.
Click the System Config tab.
Click Add. The Add Config pane displays.
From the Config Type list box, select, Flags.
From the Key list box, select Block Master VPC CIDR Allow in EKS SG.
From the Value list box, select True.
Click Submit. The setting is displayed as BlockMasterVpcCidrAllowInEksSg in the System Config tab.
Kubernetes Containers
You can display and manage the Containers you have defined in the DuploCloud portal. Navigate to Kubernetes -> Containers.
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. |
Downloading the Kubectl Token and KubeConfig
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.
In the DuploCloud Portal, select Administrator -> Infrastructure from the navigation pane.
Select the Infrastructure in the Name column.
Click the EKS tab.
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.
Run the following commands, in a local Bash shell instance:
You have now configured kubectl
to point and access the Kubernetes cluster. You can apply deployment templates by running the following command:
If you need security tokens of a longer duration, create them on your own. Secure them outside of the DuploCloud environment.
Passing Kubernetes Configs and Secrets
See this section in the Duplocloud Kubernetes documentation.
Downloading and configuring KubeCtl Token
See this section in the DuploCloud Kubernetes documentation.
Setting Up Docker Registry Credentials
See this section in the DuploCloud documentation.
Add Pod Toleration spec to a Container configuration
See Kubernetes Pod Toleration for examples of specifying K8s YAML for Pod Toleration.
Last updated