.spec.template.metadata.annotations field of a workload.apiVersion: apps/v1kind: Deploymentmetadata:name: nginxspec:replicas: 1selector:matchLabels:app: nginxtemplate:metadata:labels:app: nginxannotations:eks.tke.cloud.tencent.com/retain-ip: 'true' # A Pod annotation is added in the `.spec.template.metadata.annotations` field of a workload.spec:containers:- name: nginximage: nginx
eks-config ConfigMap in the kube-system namespace. If there are no such configurations, create one.apiVersion: v1kind: ConfigMapmetadata:name: eks-confignamespace: kube-systemdata:pod.annotations: |eks.tke.cloud.tencent.com/resolv-conf: |nameserver 183.60.83.19eks.tke.cloud.tencent.com/host-sysctls: '[{"name": "net.core.rmem_max","value": "26214400"}]'
eks.tke.cloud.tencent.com/cpu: '8'eks.tke.cloud.tencent.com/mem: '16Gi' # The memory needs to be measured in Gi. If G is used, parameter errors will be reported.
eks.tke.cloud.tencent.com/root-cbs-size: '50' # Specify the system disk size. Additional charges are applied for the part of the size exceeding 20 Gi
eks.tke.cloud.tencent.com/spec-auto-upgrade: 'true' # When resources are insufficient, enable automatic specification upgrade, which is performed only once according to the CPU specifications.
eks.tke.cloud.tencent.com/gpu-type: 'T4,V100' # Specify the GPU model by priority. If you use the 1/4 T4 vGPU, specify it as 1/4*T4.
Request and Limit based on your GPU model. For more information, see Resource Specifications.eks.tke.cloud.tencent.com/cpu-type: 'amd,intel' # It indicates that AMD resource Pods are created first. If the AMD resources in the AZ of the selected region are insufficient, Intel resource Pods are created.
eks.tke.cloud.tencent.com/spot-pod: 'true'
eks.tke.cloud.tencent.com/retain-ip: 'true' # Set the value to `true` to enable the fixed IP.eks.tke.cloud.tencent.com/retain-ip-hours: '48' # The maximum IP retention period in hours. If a terminated Pod is not created after this period, the IP will be released.
eks.tke.cloud.tencent.com/eip-attributes: '{"InternetMaxBandwidthOut":50, "InternetChargeType":"TRAFFIC_POSTPAID_BY_HOUR"}' # The value can be an empty string, indicating that the EIP is enabled and the default configuration is used. You can also use the JSON parameter used to create the EIP API. For more information on the parameter list, visit https://cloud.tencent.com/document/api/215/16699#2.-.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0. In this example, the parameter indicates that the EIP is pay-as-you-go and the bandwidth cap is 50 Mbps.
eks.tke.cloud.tencent.com/eip-attributes: '{}' # Enable the EIP and use the default configuration.eks.tke.cloud.tencent.com/eip-claim-delete-policy: 'Never' # It indicates whether to repossess the EIP after the Pod is deleted. By default, it is repossessed. `Never` indicates not to repossess, which means the same EIP will be bound to the next Pod created under the same name, thereby fixing the EIP.
Never is set for Deployment workloads, the EIP will not be repossessed after the Pod is deleted or used for the roll-updated Pod.eks.tke.cloud.tencent.com/eip-id-list: 'eip-xx1,eip-xx2' # Specify the list of existing EIP instances and make sure that the number of Pod replicas in StatefulSet is less than or equal to that of EIP instances.
eip-attributes annotation.eks.tke.cloud.tencent.com/registry-insecure-skip-verify: 'harbor.example.com' # You can write multiple ones separated by comma.
eks.tke.cloud.tencent.com/registry-http-endpoint: 'harbor.example.com' # You can write multiple ones separated by comma.
cbs-reuse-key annotation to all of them:eks.tke.cloud.tencent.com/cbs-reuse-key: 'image-name'
eks.tke.cloud.tencent.com/use-image-cache: 'auto'
eks.tke.cloud.tencent.com/image-cache-disk-type: 'CLOUD_SSD' # Specify the type of cloud disk created with the image cache. Valid values: `CLOUD_BASIC` (HDD cloud disk), `CLOUD_PREMIUM` (Premium Cloud Disk, it is the default value), `CLOUD_SSD` (SSD), `CLOUD_HSSD` (Enhanced SSD), `CLOUD_TSSD` (ulTra SSD).
eks.tke.cloud.tencent.com/image-cache-disk-size: '50' # Specify the size of cloud disk created with the image cache. The default size is the one set when the cloud disk was created. The size can only be increased, but cannot be decreased.
eks.tke.cloud.tencent.com/use-image-cache: 'imc-xxx'
eks.tke.cloud.tencent.com/image-cache-disk-retain-minute: '10' # Specify to retain the data disk created by the image cache for 10 minutes after Pod termination.
default security group in the default project in the same region. You can also specify a security group by adding the following annotation to the Pod:eks.tke.cloud.tencent.com/security-group-id: 'sg-id1,sg-id2' # Enter the IDs of the security groups in the region and separate them by comma. Network policies take effect based on the sequence of security groups. By default, a security group can be bound to up to 2,000 Pods. To increase this limit, submit a ticket for application.
TKE_QCSLinkedRoleInEKSLog role and grant log collection components in the Pods the permission to report logs. You can associate Pods with other CAM roles by using the annotation to get permissions to manipulate Tencent Cloud resources.eks.tke.cloud.tencent.com/role-name: 'TKE_QCSLinkedRoleInEKSLog'
eks.tke.cloud.tencent.com/host-sysctls: '[{"name": "net.core.rmem_max","value": "26214400"},{"name": "net.core.wmem_max","value": "26214400"},{"name": "net.core.rmem_default","value": "26214400"},{"name": "net.core.wmem_default","value": "26214400"}]'
eks.tke.cloud.tencent.com/host-modprobe: 'toa'
eks.tke.cloud.tencent.com/recreate-node-lost-pod: "false"
eks.tke.cloud.tencent.com/heartbeat-lost-period: 1m
df -h.du command.lsof command.failed to garbage collect required amount of images. Wanted to free 7980402688 bytes, but freed 0 bytes
eks.tke.cloud.tencent.com/image-gc-high-threshold: '80' # When the disk usage reaches 80%, image cleanup is triggered.eks.tke.cloud.tencent.com/image-gc-low-threshold: '75' # After triggered, the container image cleanup stops when 5% (high-threshold - low-threshold) of the space is released.eks.tke.cloud.tencent.com/image-gc-period: '3m' # The disk space is checked once every three minutes by default.
eks.tke.cloud.tencent.com/container-gc-threshold: "85"
eks.tke.cloud.tencent.com/must-keep-last-container: "true"
eks.tke.cloud.tencent.com/pod-eviction-threshold: "85" # This feature is enabled after set. It is not enabled by default.
curl -g "http://<pod-ip>:9100/metrics"
ipvs metric for large clusters:curl -g "http://<pod-ip>:9100/metrics?collect[]=ipvs"
listen() to 0.0.0.0:9100, backlog 511 failed (1: Operation not permitted)
eks.tke.cloud.tencent.com/metrics-port: "9110"
cAdvisor monitoring data exposed on the super node is refreshed once every 30s by default. You can adjust the refresh frequency with the following annotation:eks.tke.cloud.tencent.com/cri-stats-interval: '30s'
/metrics path, which doesn't need to be changed. To customize it, use the following annotation:eks.tke.cloud.tencent.com/custom-metrics-url: '/metrics'
eth0 ENI. To rename the ENI, add the following annotation:internal.eks.tke.cloud.tencent.com/pod-eth-idx: '1' # Name the ENI `eth1`.
183.60.83.19 and 183.60.82.98 in the VPC. To modify it, configure the following annotation:eks.tke.cloud.tencent.com/resolv-conf: |nameserver 4.4.4.4nameserver 8.8.8.8
internal.eks.tke.cloud.tencent.com/tail-buffer-max-size: '2M' # A single-line log with the maximum size of 2M is supported by default.
log. To configure it to message, use the following annotation:eks.tke.cloud.tencent.com/log-key-as-message: 'true'
kubernetes field as a string. To set it to the json format, configure the following annotation:eks.tke.cloud.tencent.com/filebeat-metadata-format: 'true'
eks.tke.cloud.tencent.com/reserve-sandbox-duration: '1m' # Enable the feature to delay the termination for one minute. When the last container of the Pod in the `Failed` status exits, the underlying resources are retained for one minute.eks.tke.cloud.tencent.com/reserve-succeeded-sandbox: 'false' # Termination delay only applies to Pods in the `Failed` status. You can also change the field to apply it to Pods in the `Succeeded` status.eks.tke.cloud.tencent.com/reserve-task-shorter-than: '5s' # If you only care about short-running jobs, you can configure this parameter. Then the termination delay will be triggered only when any container in the Pod runs shorter than the specified value. This parameter is not enabled by default.
eks.tke.cloud.tencent.com/cluster-ip-switch: 'disable'
dnsPolicy of ClusterFirst cannot be used by the Pod, and you need to change it to another type such as Default.eks.tke.cloud.tencent.com/duration-to-wait-service-rules: '30s' # Wait for the service rule sync to be completed before starting the Pod. The maximum value of 30s is set here.
eks.tke.cloud.tencent.com/ipvs-scheduler: 'sh' # Scheduling algorithm. `sh` refers to source hash. Forwarding based on the source address hash facilitates distributed global loading balancing. The default value is `rr` (round robin).eks.tke.cloud.tencent.com/ipvs-sh-port: "true" # Source hash is performed by port, which is valid only when `ipvs-scheduler` is `sh`.eks.tke.cloud.tencent.com/ipvs-sync-period: '30s' # The maximum interval for refreshing rules, which defaults to 30s.eks.tke.cloud.tencent.com/ipvs-min-sync-period: '2s' # The minimum interval for refreshing rules. By default, rules are refreshed upon service changes. You can modify this parameter to avoid frequent refreshes.
service.cloud.tencent.com/discard-loadbalancer-ip: 'true' # The annotation is configured for the service and takes effect immediately without Pod rebuild required.
eks.tke.cloud.tencent.com/host-timezone: 'Asia/Shanghai' # This annotation is used to set the Pod time zone to UTC +8.
Feedback