CCE.Deployment
Element Description
The CCE.Deployment element is used to create a Deployment object in the Kubernetes cluster on Huawei CCE. Currently, the Kubernetes native YAML file can be used to create the object.
Element Properties
Property |
Required |
Descripiton |
---|---|---|
namespace |
No |
Namespace in a cluster where a resource is located Type: string Value Description: Must be a valid namespace in the cluster, for example, default. Value Constraint: The value must start with a letter. Only lowercase letters, digits, and hyphens (-) are allowed. Suggestion: Log in to the CCE console, choose Resource Management > Namespaces, and query information as required. |
k8sManifest |
Yes |
Deployment object in the Kubernetes cluster created by the CCE service Type: dict Value Description: This field can be customized. You are advised to use a public image (uploading an image to SWR and setting the image type to public). When updating the image, do not change the name and labels under metadata. If replicas under spec is specified using a get_input function, set type to integer. Suggestion: Enter the native YAML file content of the Kubernetes object. |
clusterId |
No |
ID of the CCE cluster to which the resource belongs Type: HuaweiCloud.CCE.Cluster.Id Value Description: Indicates the ID of an existing or new container cluster. Value Constraint: The value must satisfy the UUID rule and support a maximum of 64 characters. Suggestion: Enter the cluster ID. Specifically, log in to the CCE console, and choose Resource Management > Clusters. Click the target cluster, and you can obtain its cluster ID. Connect to the cluster object and use the get_reference function to automatically obtain the value. |
Relationships Between Elements
Description |
Target |
---|---|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
ContainedIn |
Return Value
Property |
Type |
Description |
---|---|---|
chargeMode |
No |
Billing mode (billed by traffic or bandwidth) Type: string Value Description: Supports bandwidth and traffic. When this parameter is left blank or empty, the default value is bandwidth. Default: bandwidth Value Constraint: Supports bandwidth and traffic. |
refName |
string |
Name of the created Deployment object |
refLabelsApp |
string |
Name of label app |
Blueprint Example
tosca_definitions_version: huaweicloud_tosca_version_1_0 inputs: containername: default: deployment-123 type: string deploymentname: default: deploymenttest type: string image: default: nginx type: string imagePullPolicy: default: IfNotPresent type: string labels: default: mydeployment type: string node_templates: my-deployment: type: HuaweiCloud.CCE.Deployment properties: k8sManifest: apiVersion: 'apps/v1' kind: Deployment metadata: labels: 'cce/appgroup': get_input: labels name: get_input: deploymentname spec: 'replicas:{get_input': 'deploymentname}' selector: matchLabels: 'cce/appgroup': get_input: labels template: metadata: labels: 'cce/appgroup': get_input: labels spec: containers: - image: get_input: image name: get_input: containername imagePullPolicy: get_input: imagePullPolicy
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