Alias | Component Name | Description |
eklet | Supernodes manager | It manages the lifecycle of PodSandboxes and provides APIs related to native kubelet and nodes. |
tke-scheduler | Scheduler | It migrates workloads to the cloud elastically according to scheduling policies and is only installed in non-TKE Kubernetes Distro K8s clusters. TKE Kubernetes Distro is a K8s distribution released by TKE to help you create exactly the same K8s cluster in TKE. Currently, it has been open sourced at GitHub. For more information, please see TKE Kubernetes Distro. |
admission-controller | Toleration controller | It adds a toleration to a Pod in pending status to make it able to be scheduled to a supernode. |
AUTO_SCALE_EKS=true|false
is available in global and local dimensions respectively to control whether workloads in pending
status should be elastically scheduled to EKS as detailed below:AUTO_SCALE_EKS
in kubectl get cm -n kube-system eks-config
is enabled by default.spec.template.metadata.annotations ['AUTO_SCALE_EKS']
Global Switch | Local Switch | Behavior |
AUTO_SCALE_EKS=true | AUTO_SCALE_EKS=false | Successfully scheduled |
AUTO_SCALE_EKS=true | Undefined | Successfully scheduled |
AUTO_SCALE_EKS=true | AUTO_SCALE_EKS=true | Successfully scheduled |
AUTO_SCALE_EKS=false | AUTO_SCALE_EKS=false | Failed to be scheduled |
AUTO_SCALE_EKS=false | Undefined | Failed to be scheduled |
AUTO_SCALE_EKS=false | AUTO_SCALE_EKS=true | Successfully scheduled |
Undefined | AUTO_SCALE_EKS=false | Successfully scheduled |
Undefined | Undefined | Successfully scheduled |
Undefined | AUTO_SCALE_EKS=true | Successfully scheduled |
tke-scheduler
in workloads. In TKE Kubernetes Distro, you don't need to specify the scheduler.LOCAL_REPLICAS: N
.pending
status will be scaled out to EKS.pending
status will be scaled out to TKE Serverless cluster.DaemonsetForbidden
will be displayed.kube-system
and tke-eni-ip-webhook
namespaces cannot be scheduled to supernodes.securityContext.sysctls ["net.ipv4.ip_local_port_range"]
value includes 61000–65534 cannot be scheduled.Pod.Annotations [tke.cloud.tencent.com/vpc-ip-claim-delete-policy]
cannot be scheduled.container (initContainer).ports [].containerPort (hostPort)
value includes 61000–65534 cannot be scheduled.container (initContainer)
where the probe points to 61000–65534 cannot be scheduled.eks.tke.cloud.tencent.com/resolv-conf
annotation to a supernode, /etc/resolv.conf
in the generated CVM instance will be updated to the custom content. eks.tke.cloud.tencent.com/resolv-conf: |nameserver 4.4.4.4nameserver 8.8.8.8
tke-resilience helm chart
git clone https://github.com/tkestack/charts.git
charts/incubator/tke-resilience/values.yaml
and configure the following information:cloud:appID: "{Tencent Cloud account APPID}"ownerUIN: "{Tencent Cloud account ID}"secretID: "{Tencent Cloud account secretID}"secretKey: "{Tencent Cloud account secretKey}"vpcID: "{ID of the VPC where the EKS Pod resides}"regionShort: "{Abbreviation of the region where the EKS Pod resides}"regionLong: "{Full name of the region where the EKS Pod resides}"subnets:- id: "{ID of the subnet where the EKS Pod resides}"zone: "{AZ where the EKS Pod resides}"eklet:PodUsedApiserver: "{API server address of the current cluster}"
helm install tke-resilience --namespace kube-system ./tke-resilience --debug
# kubectl get Pod -n kube-system | grep resilienceeklet-tke-resilience-5f9dcd99df-rgsmc 1/1 Running 0 43heks-admission-tke-resilience-5bb588dc44-9hvhs 1/1 Running 0 44h
# kubectl get nodeNAME STATUS ROLES AGE VERSION10.0.1.xx Ready <none> 2d4h v1.20.4-tke.110.0.1.xx Ready master 2d4h v1.20.4-tke.1eklet-subnet-xxxxxxxx Ready <none> 43h v2.4.6
nginx-deployment
, which has four replicas (three in TKE Serverless cluster and one in the local cluster). Below is the sample YAML configuration:apiVersion: apps/v1kind: Deploymentmetadata:name: nginx-deploymentlabels:app: nginxspec:replicas: 4strategy:type: RollingUpdateselector:matchLabels:app: nginxtemplate:metadata:annotations:AUTO_SCALE_EKS: "true"LOCAL_REPLICAS: "1" # Set the number of running replicas in the local cluster to 1labels:app: nginxspec:#schedulerName: tke-scheduler If it is a third-party cluster, you need to run the scheduler as `tke-scheduler`containers:- name: nginximage: nginximagePullPolicy: IfNotPresent
# kubectl get Pod -owideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESnginx-deployment-77b9b9bc97-cq9ds 1/1 Running 0 27s 10.232.1.88 10.0.1.xxx <none> <none>nginx-deployment-77b9b9bc97-s9vzc 1/1 Running 0 27s 10.0.1.118 eklet-subnet-xxxxxxxx <none> <none>nginx-deployment-77b9b9bc97-sd4z5 1/1 Running 0 27s 10.0.1.7 eklet-subnet-xxxxxxxx <none> <none>nginx-deployment-77b9b9bc97-z86tx 1/1 Running 0 27s 10.0.1.133 eklet-subnet-xxxxxxxx <none> <none>
# kubectl scale deployment nginx-deployment --replicas=3
# kubectl get Pod -owideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESnginx-deployment-77b9b9bc97-cq9ds 1/1 Running 0 7m38s 10.232.1.88 10.0.1.xxx <none> <none>nginx-deployment-77b9b9bc97-s9vzc 1/1 Running 0 7m38s 10.0.1.118 eklet-subnet-xxxxxxxx <none> <none>nginx-deployment-77b9b9bc97-sd4z5 1/1 Running 0 7m38s 10.0.1.7 eklet-subnet-xxxxxxxx <none> <none>
Apakah halaman ini membantu?