You can use Cloud Toolkit to quickly deploy applications to Container Service for Kubernetes. This topic describes how to deploy an application from Eclipse to a Container Service for Kubernetes cluster.
Prerequisites
- Install and configure Cloud Toolkit in Eclipse. For more information, see Install and configure Cloud Toolkit in Eclipse.
- Create an image repository in the Container Registry console and use an image to create an application. For more information, see Create an image repository and Create an application from an image.
Set up the Docker environment
- In the Eclipse toolbar, click the Cloud Toolkit icon and select Preference from the drop-down menu.
- In the Preference (Filtered) dialog box, choose from the navigation pane on the left.
- On the Server page, configure a connectable Docker environment and click Apply.
- Local Docker environment:
- If your local operating system is macOS or Linux, select the Unix Socket check box, click Browse, and select the local Docker installation folder.
- If your local operating system is Windows, select the TCP Connection check box. In the URI text box, enter the URI of your local Docker, such as http://127.0.0.1:2375.
- Remote Docker environment: Select the TCP Connection check box. In the URI text box, enter the URI of the remote Docker environment, including the IP address and port. For example, http://x.x.x.x:2375. Make sure that the HTTP service is enabled on the remote host.

- Local Docker environment:
Deploy the application to Container Service for Kubernetes
- In the Package Explorer pane on the left side of the Eclipse interface, right-click your Docker application project. From the shortcut menu, choose .
- In the Deploy to CS Kubernetes dialog box, under Select a package method, select the Context Directory and Dockerfile for your local application. These are usually detected and set automatically. Then, click Next.
Note If needed, select the Use maven build check box to build the application project with Maven. - In the Deploy to CS Kubernetes dialog box, under Select a Repository, select the Type, Region, Namespace, and Image Repository for Container Registry, and then click Next. For more information about image repository deployment, see Deploy an application to an image repository using Eclipse.
Note If you do not have an image repository, click Create a new repositories in the upper-right corner of the dialog box to go to the Container Registry console and create one. For more information about how to create an image repository, see Container Registry. - In the Deploy to CS Kubernetes dialog box, under Deploy Project to CS Kubernetes, configure the parameters for the container service deployment and click Finish.
The following table describes the container deployment parameters.
Parameter Description Deployment Kubernetes Type Select Alibaba Cloud Kubernetes to deploy to Alibaba Cloud Container Service for Kubernetes. Region Select a region. Cluster Select a cluster. Namespace Select a namespace. Note If you do not have a container service, click Create a new Kubernetes deployment in the upper-right corner of the dialog box to go to the Container Service console and create one. For more information, see Create an ACK managed cluster.
Verify the results
After the deployment starts, deployment logs are displayed in the Console area of Eclipse. You can check the deployment result in the logs.
If you have questions while using Cloud Toolkit, contact us.
该文章对您有帮助吗?