kubernetes - Kubernetes Pod 命名规则
问题描述
在我的 kubernetes 集群的安装过程中,我遇到了命名 pod 的问题。
如何将部署它的节点的名称添加到容器的名称中?
我的守护程序集 yaml 的示例:
....
spec:
template:
spec:
name: CONTAINER-NAME-HOST-NAME
....
解决方案
命名约定属于 DNS 标签的RFC 1123 定义。
Starting from v1.4 names must not be longer than 253 characters.
Name should be expressed by the regular expression: [a-z0-9]([-a-z0-9]*[a-z0-9])?
Underscore "_" is not allowed.
推荐阅读
- java - 可以有效存储和检查任意三个连续添加元素的总和是否等于给定总和的数据结构
- facebook - user_posts 在 Facebook GraphAPI Explorer 中不可用
- javascript - Javascript 正则表达式组不捕获重复组?
- python - 熊猫在两个excel中组合数据
- php - kartik\datecontrol\DateControl not found
- python - 将查询合二为一,然后按日期排序
- c# - 不可见的控件会减慢您的应用程序渲染速度吗?
- ios - 如何在视图中通过 CAShapeLayer 绘制垂直虚线?
- android - 如何使用文件名访问可绘制文件夹中的图像?
- arrays - 给定一个整数数组,在线性时间和常数空间中找到第一个丢失的正整数