tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary

Custom Image Specifications

PDF
Focus Mode
Font Size
Last updated: 2026-03-19 11:03:17

Scenarios

This document describes how to use the base images provided by Tencent Cloud TKE to create custom images.
Note:
1. Base images refer to the public images supported by TKE. For the image list, see Image Overview.
2. Custom images are non-standard operating environments. The platform has not undergone compatibility adaptation, and users need to ensure the availability of images in Kubernetes environments on their own. For such images, TKE does not provide SLA services or technical support in principle.

Usage Instructions

Currently, only the creation of the same type of operating system images is supported. For example, using CentOS base images to create CentOS custom images.
If you use the custom image feature, please use the base images provided by TKE to create custom images.
If TKE plans to adjust the image logic later, it will notify users via in-site messages, SMS, and email at least one week in advance. Changes to the image logic may cause failures when creating new nodes with existing custom images. You need to recreate custom images accordingly. If your cluster uses node pools, you need to adjust the image configuration of the node pools.
If you need to use the custom image feature, please submit a ticket to apply.

Must-Knows

Before custom images are created, be sure to carefully read the following notes. Custom images are considered non-standard environments. Tencent Cloud does not provide official support or ongoing maintenance for them.
Do not modify /etc/fstab at will.
After creating the image, promptly clean up the /var/lib/cloud directory.
If you have pre-installed runtime components in the custom image, node initialization will fail and report an error directly.
Before creating a custom image, be sure to complete node pre-cleaning via the cleanup script to avoid residual data on the current machine affecting the normal node initialization process. Do not run this on existing cluster nodes, as it may render them unavailable. Run the command as follows:
curl --proto '=https' --tlsv1.2 -sSf https://mirrors.tencent.com/install/tke/clean-node.sh | bash
Note:
Do not use running normal nodes (CVM instances) in the cluster to create custom images. If you need to use them, first remove them from the cluster.
Please use the base images provided by TKE to create custom images.

Operation Steps

This document takes creating a Cloud Virtual Machine (CVM) using a base image as an example.

1. Create CVM

1. Log in to the CVM console, select New to go to the CVM purchase page.
2. In the Images section, select the TKE base image. Here we take the public image TencentOS Server 3.1 as an example.
3. For other option settings, see Create a CVM Instance.

2. Create a Custom Image

2. Run the following command to create a new test.txt file.
vi test.txt
3. Press i to enter edit mode and write the following content.
this is customer cvm images test
4. Press Esc and enter :wq to save and exit.
5. See Create a custom image to complete the creation.

3. Use Custom Image

Note:
The region of the custom image you create (or share) must match the region of the TKE cluster.
After the custom image is created, you can use this image to create a TKE cluster. On the Create Cluster page, select Custom Image in Image Provider, and then select the created custom image in Operating System.
For other option settings, see Create Cluster.

4. Validate Custom Image

1. Log in to the TKE console and select Cluster in the left sidebar.
2. Select the cluster ID created using a custom image and go to the cluster details page.
3. On the Node Management page, select Node and record the node ID to log in to and verify.
4. Log in to the CVM console, enter the recorded node ID in the search box and click

, you can see the created nodes. As shown in the following figure:



6. Run the following command to verify the custom image.
cat test.txt
The returned result is as follows, which indicates that the node is using a custom image.



Summary of Usage

Custom images must be created using the base images provided by TKE. Custom images that do not meet this requirement will not be displayed on the TKE console.
If file protection (chattr +i /etc/resolv.conf) is set for the /etc/resolv.conf file in the custom image, it will cause cloud-init to fail. Since TKE depends on the successful status of cloud-init, this will eventually cause the node to fail to join the cluster.
Due to the inability to guarantee the execution sequence between rc.local and container_cluster_agent, data copied by the user's start_init.sh script may be lost. It is not recommended to execute start_init.sh in rc.local. Instead, it is advised to execute it in user-data.
If the /var/lib/cloud directory is retained on a node that has previously created an image, the config_scripts_user file in the /var/lib/cloud/instances/${instance-id}/sem directory will interfere with the normal execution of the cloud-init service. This will cause the modified hostname of the node to fail to take effect when the node joins the TKE cluster.
When a personal yum repository is added in a custom image, placing it in an inappropriate directory (such as /etc/yum.repos.d/) will cause container-cluster-agent to report errors when executing the yum install operation, resulting in the step being skipped and causing the agent to fail to install the yum repository.

FAQs

Possible Reasons Why Custom Images Cannot Be Seen on the TKE Console:

1. The base image you selected is not visible on the CVM console. This scenario requires you to submit a ticket to apply.
2. The base image you selected is not within the list of TKE-supported public images. For the image list, see Image Overview.
3. The region of the custom image you created (or shared) does not match the cluster region.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback