华为云cce配置
kubect top node
插件管理 -- 安装 metrics-server
kubectl get node --show-labels=true
[root@10-21-0-1 ~]# (for i in `kubectl get node --show-labels=true|tail -n +2|awk '{print $NF}'|paste -s -d","|sed 's#,# #g'`;do echo "${i}";done)|sort -n|uniq -c
4 beta.kubernetes.io/arch=amd64
1 beta.kubernetes.io/instance-type=c7.large.2
4 beta.kubernetes.io/os=linux
3 cce.cloud.com/cce-nodepool=v121-dev1-nodepool-12828
1 cce.cloud.com/cce-nodepool=v121-dev1-nodepool-79345-emp
4 failure-domain.beta.kubernetes.io/region=cn-south-1
2 failure-domain.beta.kubernetes.io/zone=cn-south-1c
1 failure-domain.beta.kubernetes.io/zone=cn-south-1e
1 failure-domain.beta.kubernetes.io/zone=cn-south-1f
4 kubernetes.io/arch=amd64
1 kubernetes.io/hostname=10.21.0.177
1 kubernetes.io/hostname=10.21.0.66
1 kubernetes.io/hostname=10.21.2.202
1 kubernetes.io/hostname=10.21.9.131
4 kubernetes.io/os=linux
4 node.kubernetes.io/baremetal=false
4 node.kubernetes.io/container-engine=docker
4 node.kubernetes.io/instance-type=c7.large.2
4 node.kubernetes.io/subnetid=53d4b9d9-ca3d-481d-b9f1-f2baa5839c01
1 nodetype=ssd
4 os.architecture=amd64
4 os.name=CentOS_Linux_7_Core
4 os.version=3.10.0-1160.25.1.el7.x86_64
4 topology.kubernetes.io/region=cn-south-1
2 topology.kubernetes.io/zone=cn-south-1c
1 topology.kubernetes.io/zone=cn-south-1e
1 topology.kubernetes.io/zone=cn-south-1f
[root@10-21-0-1 ~]# kubectl label nodes 10.21.0.177 nodetype=ssd
node节点伸扩缩容
https://support.huaweicloud.com/usermanual-cce/cce_10_0209.html
1.不满足部署情况下的扩容
2.cpu和内存下的扩容
3.节点缩容
kubectl describe node 10.21.0.177
[root@10-21-0-1 ~]# kubectl get node
NAME STATUS ROLES AGE VERSION
10.21.0.177 Ready <none> 20d v1.21.5-r0-CCE22.5.1
10.21.0.66 Ready <none> 20d v1.21.5-r0-CCE22.5.1
10.21.2.202 Ready <none> 20d v1.21.5-r0-CCE22.5.1
10.21.5.175 Ready <none> 6m1s v1.21.5-r0-CCE22.5.1
10.21.9.131 Ready <none> 17d v1.21.5-r0-CCE22.5.1
[root@10-21-0-1 ~]# kubectl describe node 10.21.0.177
Name: 10.21.0.177
Roles: <none>
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
cce.cloud.com/cce-nodepool=v121-dev1-nodepool-12828
failure-domain.beta.kubernetes.io/region=cn-south-1
failure-domain.beta.kubernetes.io/zone=cn-south-1f
kubernetes.io/arch=amd64
kubernetes.io/hostname=10.21.0.177
kubernetes.io/os=linux
node.kubernetes.io/baremetal=false
node.kubernetes.io/container-engine=docker
node.kubernetes.io/instance-type=c7.large.2
node.kubernetes.io/subnetid=53d4b9d9-ca3d-481d-b9f1-f2baa5839c01
nodetype=ssd
os.architecture=amd64
os.name=CentOS_Linux_7_Core
os.version=3.10.0-1160.25.1.el7.x86_64
topology.kubernetes.io/region=cn-south-1
topology.kubernetes.io/zone=cn-south-1f
Annotations: alpha.kubernetes.io/provided-node-ip: 10.21.0.177
csi.volume.kubernetes.io/nodeid:
{"disk.csi.everest.io":"0408bfde-0ae5-48cf-9442-90ec1bcf19a3","local.csi.everest.io":"0408bfde-0ae5-48cf-9442-90ec1bcf19a3","nas.csi.evere...
node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Fri, 23 Sep 2022 15:18:37 +0800
Taints: <none>
Unschedulable: false
Lease:
HolderIdentity: 10.21.0.177
AcquireTime: <unset>
RenewTime: Fri, 14 Oct 2022 14:19:34 +0800
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
MemoryPressure False Fri, 14 Oct 2022 14:16:58 +0800 Fri, 23 Sep 2022 15:18:35 +0800 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Fri, 14 Oct 2022 14:16:58 +0800 Fri, 23 Sep 2022 15:18:35 +0800 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Fri, 14 Oct 2022 14:16:58 +0800 Fri, 23 Sep 2022 15:18:35 +0800 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Fri, 14 Oct 2022 14:16:58 +0800 Fri, 23 Sep 2022 15:18:47 +0800 KubeletReady kubelet is posting ready status
Addresses:
InternalIP: 10.21.0.177
Hostname: 10.21.0.177
Capacity:
cpu: 2
ephemeral-storage: 10186004Ki
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 3754864Ki
pods: 72
Allocatable:
cpu: 1930m
ephemeral-storage: 9387421271
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 2218864Ki
pods: 72
System Info:
Machine ID: 0408bfde-0ae5-48cf-9442-90ec1bcf19a3
System UUID: 0408BFDE-0AE5-48CF-9442-90EC1BCF19A3
Boot ID: efe60d79-c5b1-4715-b7e6-3f010db6f465
Kernel Version: 3.10.0-1160.25.1.el7.x86_64
OS Image: CentOS Linux 7 (Core)
Operating System: linux
Architecture: amd64
Container Runtime Version: docker://18.9.0
Kubelet Version: v1.21.5-r0-CCE22.5.1
Kube-Proxy Version: v1.21.5-r0-CCE22.5.1
ProviderID: 9c204002-3b0f-11ed-9ccf-0255ac1000ba
Non-terminated Pods: (18 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age
--------- ---- ------------ ---------- --------------- ------------- ---
default nginx-565785f75c-44fvp 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-8zkv4 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-bl5s2 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-bp8vn 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-frh7v 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-jbzzc 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-mp6wh 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-mq772 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-qdmc7 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-sz9pg 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-tcrx8 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-td47t 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-tv7tc 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
default nginx-565785f75c-v9t7m 0 (0%) 0 (0%) 0 (0%) 0 (0%) 9m27s
kube-system coredns-785b4d6488-s6qhr 500m (25%) 500m (25%) 512Mi (23%) 512Mi (23%) 20d
kube-system everest-csi-controller-cdc7b4df4-ckkf2 250m (12%) 250m (12%) 600Mi (27%) 1500Mi (69%) 20d
kube-system everest-csi-driver-mz7dd 200m (10%) 600m (31%) 600Mi (27%) 600Mi (27%) 20d
kube-system icagent-l8gqx 0 (0%) 0 (0%) 0 (0%) 0 (0%) 20d
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 950m (49%) 1350m (69%)
memory 1712Mi (79%) 2612Mi (120%)
ephemeral-storage 0 (0%) 0 (0%)
hugepages-1Gi 0 (0%) 0 (0%)
hugepages-2Mi 0 (0%) 0 (0%)
Events: <none>
节点最多可以创建多少个Pod
https://support.huaweicloud.com/usermanual-cce/cce_10_0348.html
资源 -- 节点管理 - 节点/节点池
Turbo 集群 --
02核心: 016pod
04核心:032pod
08核心:064pod
12核心: 096pod
16核心: 128pod
24核心: 192pod
32/32+核心: 256pod
节点可以创建最大Pod数量与节点可使用网卡数量相关,CCE Turbo集群ECS节点使用弹性辅助网卡,您可以参考下面文档中,每个规格对应的“辅助网卡个数上限”,也就是最多可以创建的pod数。
https://support.huaweicloud.com/productdesc-ecs/zh-cn_topic_0159822360.html