检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Kubernetes配置文件中的imagePullPolicy属性是用于描述镜像的拉取策略的,如下: Always:总是拉取镜像。 imagePullPolicy: Always IfNotPresent:本地有则使用本地镜像,不拉取。 imagePullPolicy: IfNotPresent
节点之间可以在非NAT网络地址转换的情况下通信。 Pod通信 同一个节点中的Pod通信 Pod通过虚拟Ethernet接口对(Veth Pair)与外部通信,Veth Pair像一根网线,一端在Pod内部,一端在Pod外部。同一个节点上的Pod通过网桥(Linux Bridge)通信,如下图所示。
namespace: default spec: containers: - name: foo image: www.3rdregistry.com/janedoe/awesomeapp:v1 imagePullSecrets: - name: myregistrykey
地址。 安装配置kubectl。具体请参见通过kubectl连接集群。 迁移工作负载。 给需要迁移工作负载的节点打上Taint(污点)。 kubectl taint node [node] key=value:[effect] 其中,[node]为待迁移工作负载所在节点的IP;[
labels: app: npu-test spec: containers: - name: container-0 image: nginx:perl resources:
com", "driver_init_image_version": "2.4.4", "ecsEndpoint": "https://ecs.***.com", "everest_image_version": "2.4.4",
affinity: {} containers: image: nginx:latest imagePullPolicy: Always name: container-0 volumeMounts:
Containerd节点业务容器标准输出日志写入过快导致节点数据盘使用率过高 问题现象 Containerd节点上业务容器标准输出不断写入大量日志,导致/var/lib/containerd目录占用空间不断增长,同时节点上容器创删速度变慢,进一步出现磁盘使用率过高、Pod驱逐、节点异常等现象。
le spec: affinity: {} containers: - image: nginx:latest name: container-0 volumeMounts: - mountPath:
资源更新适配 镜像更新适配 由于本例使用的Wordpress和MySQL镜像均可从SWR正常拉取,因此不会出现镜像拉取失败(ErrImagePull)问题。如迁移应用为私有镜像,请执行以下步骤完成镜像更新适配。 将镜像资源迁移至容器镜像服务(SWR),具体步骤请参考客户端上传镜像。
max-worker-connections: 65536 # 内核参数优化 extraInitContainers: - name: init-myservice image: busybox securityContext: privileged:
按照指定时间周期运行的任务。适用于需要定期执行的任务,如定时数据同步、定时生成报告等。 图4 工作负载与Pod的关系 镜像(Image) 镜像(Image)是一个模板,是容器应用打包的标准格式,用于创建容器。或者说,镜像是一个特殊的文件系统,除了提供容器运行时所需的程序、库、资源
containers.env字段即可。 apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - image: nginx:alpine name: container-0
labels: app: gpu-test spec: containers: - image: nginx:perl name: container-0 resources: requests:
version: v1 spec: containers: - name: container-1 image: nginx:latest imagePullSecrets: - name: default-secret
daemonset-test spec: hostNetwork: true containers: - name: daemonset-test image: nginx:alpine-perl command: -
下载cce-image-builder 登录ECS执行机,下载cce-image-builder并解压。 wget https://cce-north-4.obs.cn-north-4.myhuaweicloud.com/cce-image-builder/cce-image-builder
steps{ echo "2. Build Docker Image Stage and Push Image" sh "docker build -t ${image_url} ." sh swr_login
如何驱逐节点上的所有Pod? 您可使用kubectl drain命令从节点安全地逐出所有Pod。 默认情况下,kubectl drain命令会保留某些系统级Pod不被驱逐,例如everest-csi-driver。 使用kubectl连接集群。 查看集群中的节点。 kubectl
容器镜像迁移 容器镜像迁移方案概述 使用docker命令将镜像迁移至SWR 使用image-migrator将镜像迁移至SWR 跨云Harbor同步镜像至华为云SWR 父主题: 迁移