This topic describes how to create a dedicated Kubernetes cluster that runs sandboxed containers in the Container Service for Kubernetes (ACK) console.
Prerequisites
Related Alibaba Cloud services are activated. For more information, see Quick start for first-time users.Limits
- ACK clusters support only virtual private clouds (VPCs).
- By default, each account has specific quotas on cloud resources that can be created. You cannot create clusters if the quota is reached. For more information about quotas, see Limits.
- By default, you can add at most 200 route entries to the virtual private cloud (VPC) where an ACK cluster is deployed. This means that you can configure at most 200 route entries for an ACK cluster deployed in a VPC. To increase the quota on the number of route entries for a VPC, Go to the Quota Center page to submit a ticket.
- By default, you can create at most 100 security groups with each account.
- By default, you can create at most 60 pay-as-you-go SLB instances with each account.
- By default, you can create at most 20 elastic IP addresses (EIPs) with each account.
- To create an ACK cluster that runs sandboxed containers, you must set the parameters as described in the following table. Otherwise, the cluster cannot run sandboxed containers.
Parameter Description Zone Only Elastic Compute Service (ECS) bare metal instances support sandboxed containers. Make sure that ECS bare metal instances are available for purchase in the selected zone. Kubernetes Version Select 1.14.6-aliyun.1 or later. Container Runtime Select Sandboxed-Container. Worker Instance Create Instance Instance Type Select ECS Bare Metal Instance. Mount Data Disk Mount a data disk of at least 200 GiB. We recommend that you mount a data disk of at least 1 TB. Operating System Sandboxed-Container supports only the Alibaba Cloud Linux operating system.
Procedure
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- In the upper-right corner of the Clusters page, click Cluster Template.
- In the Select Cluster Template dialog box, find Standard Dedicated Cluster in the Other Clusters section and click Create.
- On the Dedicated Kubernetes tab, configure the cluster.
- Click Next:Master Configurations to configure master nodes.
Parameter Description Master Node Quantity Specify the number of master nodes. You can create three or five master nodes. Instance Type Select the instance type for the master nodes. For more information, see Overview of instance families. System Disk By default, system disks are mounted to master nodes. Standard SSDs and ultra disks are supported. Note You can select Enable Backup to back up disk data. - Click Next:Node Pool Configurations to configure worker nodes.
- Click Next:Component Configurations to configure components.
Parameter Description Ingress Specify whether to install an Ingress controller. By default, Nginx Ingress is selected.- If you select Nginx Ingress, Install NGINX Ingress Controller is automatically selected. For more information about how to use NGINX Ingresses, see Advanced NGINX Ingress configurations.
- If you select ALB Ingress, the Application Load Balancer (ALB) Ingress controller is automatically installed. For more information about how to access Services in a cluster by using ALB Ingresses, see Access Services by using an ALB Ingress.
Service Discovery Specify whether to install NodeLocal DNSCache. By default, NodeLocal DNSCache is installed.
NodeLocal DNSCache runs a Domain Name System (DNS) caching agent to improve the performance and stability of DNS resolution. For more information about NodeLocal DNSCache, see Configure NodeLocal DNSCache.
Volume Plug-in Select CSI. Only the Container Storage Interface (CSI) plug-in is supported by ACK clusters that run sandboxed containers. An ACK cluster can be automatically bound to Alibaba Cloud disks, Apsara File Storage NAS (NAS) file systems, and Object Storage Service (OSS) buckets that are mounted to pods in the cluster. For more information, see Storage management-CSI. Monitoring Agents Specify whether to install the CloudMonitor agent. By default, Install CloudMonitor Agent on ECS Instance and Enable Prometheus Monitoring are selected. After the CloudMonitor agent is installed on ECS nodes, you can view monitoring data about the nodes in the CloudMonitor console.
Log Service Specify whether to enable Log Service. You can select an existing Log Service project or create one. By default, Enable Log Service is selected. When you create an application, you can enable Log Service with a few steps. For more information, see Collect log data from containers by using Log Service.
By default, Install node-problem-detector and Create Event Center is selected. You can specify whether to enable the Kubernetes event center in the Log Service console. For more information, see Create and use an event center.
Workflow Engine Specify whether to enable Alibaba Cloud Genomics Service (AGS).Note To use this feature, submit a ticket to apply to be added to a whitelist.- If you select this check box, the system automatically installs the AGS workflow plug-in when the system creates the cluster.
- If you clear this check box, you must manually install the AGS workflow plug-in. For more information, see Introduction to AGS CLI.
- Click Next:Confirm Order.
- Select Terms of Service and click Create Cluster. Note It requires approximately 10 minutes for the system to create an ACK managed cluster that contains multiple nodes.
Result
- After the cluster is created, you can find the cluster on the Clusters page in the console.
- Click View Logs in the Actions column. On the page that appears, you can view the cluster log. To view detailed log information, click Stack events.
- On the Clusters page, find the newly created cluster and click Details in the Actions column. On the details page of the cluster, click the Basic Information tab to view basic information about the cluster and click the Connection Information tab to view information about how to connect to the cluster. The following information is displayed:
- API Server Public Endpoint: the IP address and port that the API server uses to provide services over the Internet. It allows you to manage the cluster by using kubectl or other tools on the client.
- API Server Internal Endpoint: the IP address and port that the Kubernetes API server of the cluster uses to provide services within the cluster. The endpoint belongs to the Server Load Balancer (SLB) instance that is bound to the cluster. Three control planes work as the backend servers of the SLB instance.
- Testing Domain: the domain name that is used to test Services. The suffix of the domain name is
<cluster_id>.<region_id>.alicontainer.com
.Note To rebind the domain name, click Rebind Domain Name.
- You can use kubectl to connect to the cluster and run the
kubectl get node
command to query information about the nodes in the cluster. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.