Deploying an Application with a Custom Kubernetes Cluster
This section introduces how to deploy an application in a Kubernetes cluster with a manifest file defining Kubernetes objects. In this way, self-built or third-party Kubernetes clusters can be deployed.
Prerequisites
A custom cluster is available.
Procedure
- Obtain the kubeconfig file.
- Your Kubernetes cluster is used as an example.
For details, see Configure Access to Multiple Clusters.
- Example of a CCE cluster
- Go to the console. In the upper left corner of the page, choose Service List > Containers > Cloud Container Engine. Click the target cluster and click Bind next to EIP to bind the public IP address.
The CodeArts Deploy official resource pool and your Kubernetes cluster are not in the same VPC. Therefore, you can access the Kubernetes cluster only through an EIP.
- Click Configure next to kubectl in the Connection Information area. On the displayed page, click Download under Download the kubeconfig file to download the configuration file.
After the download is complete, a kubeconfig.json file is available.
- Go to the console. In the upper left corner of the page, choose Service List > Containers > Cloud Container Engine. Click the target cluster and click Bind next to EIP to bind the public IP address.
- Your Kubernetes cluster is used as an example.
- Create a Kubernetes endpoint.
- Log in to CodeArts Deploy.
- Click Create Application, enter basic information, click Next, select Blank Template, and click OK. The Deployment Actions page is displayed.
- Click All, search for Deploy a Custom Kubernetes Cluster, and click Add.
- Create an endpoint for accessing the Kubernetes cluster.
Click Create to create a Kubernetes access point.
After entering the information, click Verify and OK to check whether the endpoint is configured successfully.Table 1 Parameters Parameter
Description
Service Endpoint Name
Name of the service endpoint.
Kubernetes URL
Set this parameter to the public API Server address in the custom cluster.
Kubeconfig
Copy all content in the kubeconfig.json file.
- Configure other required parameters as prompted to complete deployment over the public network with Kubernetes.
Table 2 Parameters Parameter
Description
Region
Select the region for deployment.
Kubernetes Service Endpoint
Select the target Kubernetes access point. You can create and manage Kubernetes access points.
kubectl Command
Select the target kubectl command by referring to Command line tool (kubectl).
Use manifest file
If this option is selected, you need to select the target manifest file for deployment. The file name must be suffixed with .yaml, .yml, or .json.
kubectl Parameters
kubectl command parameters to be executed.
Control Options
Continue the task even if this action fails.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot