检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
器可以被创建、启动、停止、删除、暂停等。 工作负载:工作负载是在 Kubernetes 上运行的应用程序。一个工作负载由一个或多个实例(Pod)组成,一个实例由一个或多个容器组成,每个容器都对应一个容器镜像。 镜像、容器、工作负载之间的关系请参见下图。 图1 镜像、容器、工作负载的关系
获取容器镜像地址 云容器实例支持使用镜像中心和上传到容器镜像服务的镜像。其中 容器镜像服务从镜像中心同步了部分常用镜像,使得您可以在内部网络中直接使用“镜像名称:版本号”,如nginx:alpine,您可以在容器镜像服务控制台中查询同步了哪些镜像。 容器镜像服务中的镜像请使用镜像
负载中最小的资源单位就是Pod,访问负载就是访问负载中的Pod。负载中的Pod能够动态地创建和销毁,例如,扩缩容或者执行滚动升级,这时Pod的地址会发生变化,这为访问Pod带来了不便。 为解决该问题,云容器实例提供了coredns(内部域名解析)插件,Pod的变化由负载管理,外部无需感知。
found 错误如下图所示: 图2 报错信息 该错误出现的原因:镜像构建时使用的docker版本过低(<v1.10),部分镜像打包标准社区已经不再支持。 解决方案:请使用新版本 docker 运行时(>= docker v1.11)重新构建镜像后上传到SWR(容器镜像服务),升级负载镜像版本,重新拉取即可。
以创建和管理多个Pod,提供副本管理、滚动升级和自愈能力,其中最为常用的就是Deployment。 一个Deployment可以包含一个或多个Pod副本,每个Pod副本的角色相同,所以系统会自动为Deployment的多个Pod副本分发请求。 Deployment集成了上线部署、
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
创建Pod 功能介绍 创建一个Pod。 说明: Pod的生命周期是短暂的,Pod是用后即焚的实体。在实际使用中,请谨慎单独创建Pod,请使用Deployment、StatefulSet和Job这些控制器创建应用,从而保障应用高可用。 云容器实例中Pod规格有限制,具体的限制请参见约束限制页面的“Pod规格”部分。
rules for the pod. podAffinity 否 io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity 否 io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity 否 io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
容器配置 一个Pod可以包含一个或多个运行不同镜像的容器,通常情况下一个Pod中只有一个容器,如果您的应用程序需要多个容器,请单击“添加容器”,然后选择镜像。 同一个Pod实例中的不同容器如果监听了相同的端口,则会导致端口冲突,Pod可能会启动失败。例如在Pod中添加了一个nginx镜像
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
查询指定namespace下的Pods 功能介绍 查询指定namespace下的Pods的详细信息。 调用方法 请参见如何调用API。 URI GET /api/v1/namespaces/{namespace}/pods 表1 路径参数 参数 是否必选 参数类型 描述 namespace
rules for the pod. podAffinity io.k8s.api.core.v1.PodAffinity object Describes pod affinity scheduling rules (e.g. co-locate this pod in the same
ENV为环境变量,在云容器实例中创建负载的时候,可以在高级配置中设置,“ENV VERSION 1.0”指令在CCI中的使用,如下所示。 VOLUME为定义容器卷,通常配合docker run -v 宿主机路径:容器卷路径一起使用。 云容器实例中支持将云硬盘挂载到容器中,只需在创建负载时添加云硬盘卷,并配置大小、挂载路径(也就是容器卷的路径)即可。