zoukankan      html  css  js  c++  java
  • k8s

    version 字符串

    - 这里是指k8s API的版本,可以用kubectl api-versions 命令查看, 目前都是v1

    kind 字符串

    - 这里指的是yaml文件定义的资源类型和角色,例如:pod

    metadata 对象

    - 元数据对象,固定值就写metadata

    metadata.name 字符串

    - 元数据对象的名字,这里由我们编写,比如命名pod的名字

    metadata.namespace 字符串

    - 元数据对象的命名空间,由我们自身定义

    spec 对象

    - 详细定义对象,固定值就写spec

    spec.containers[].name 字符串

    - 这里定义容器名字

    spec.containers[].image 字符串

    - 这里定义要用到的镜像名称

    spec.containers[].imagePullPlicy 字符串

    - 定义镜像拉取策略,默认是Always

    • Always - 每次都尝试去拉镜像
    • Never - 只使用本地镜像
    • IfNotPresent - 如果本地没有就拉镜像

    spec.containers[].command[] 数组

    - 指定容器启动命令,不指定的情况下,默认使用镜像内部的启动命令

    spec.containers[].args[] 数组

    - 指定容器启动命令参数,例如--name等

    spec.containers[].workingDir 字符串

    - 指定容器的工作目录,进入容器之后默认的工作目录

    spec.cotainers[].volumeMounts[] 数组

    - 指定容器内部的存储卷配置

    spec.containers[].volumeMouts[].name 字符串

    - 指定可以被挂载的存储卷名称

    spec.containers[].volumeMounts[].mountPath 字符串

    -  指定可以被挂载的存储卷路径

    spec.containers[].volumeMounts[].readOnly 字符串

    - 设置存储卷路径的读写模式,true或者false,默认为读写模式

    spec.containers[].ports[] 数组

    - 指定容器需要用到的端口列表

    spec.containers[].ports[].name 字符串

    - 指定端口名称

    spec.cotainers[].ports[].containerPort 字符串

    - 指定容器需要监听的端口

    spec.containers[].ports[].hostPort 字符串

    - 指定容器所在主机需要监听的端口号,默认跟上面containerPort相同,注意设置hostPort同一台主机无法启动该容器的相同副本,因为主机端口号不能相同,这样会冲突

    spec.containers[].ports[].protocol 字符串

    - 指定端口协议,支持TCP和UDP,默认值为TCP

    spec.containers[].env[] 数组

    - 指定容器运行前设置的环境变量列表

    spec.containers[].env[].name 字符串

    - 指定环境变量

     spec.containers[].env[].value 字符串

    - 指定环境变量值

     spec.containers[].resources 对象

    - 指定资源限制和资源请求的值,这里开始就是设置容器的资源上限

     spec.containers[].resources.limits 对象

    - 指定设置容器运行时资源的运行上限

     spec.containers[].resource.limits.cpu 字符串

    - 指定CPU的限制,单位为core数,将用于docker run --cpu-shares参数

    spec.containers[].limits.memory 字符串 

    - 指定MEM内存的限制,单位为MIB,GIB

    spec.containers[].requests 对象 

    - 指定容器启动和调度的限制设置

    spec.containers[].requests.cpu 字符串 

    - CPU请求,单位为core数,容器启动时初次化可用数量

    spec.containers[].requests.memory 字符串

    - 内存请求,单位为MIB,Gib容器启动的初次化可用数量

  • 相关阅读:
    将h.264视频流封装成flv格式文件(一.flv格式)(转载)<a href="http://blog.csdn.net/yeyumin89/article/details/7932368"></a>
    01背包,求最大值
    JNI vc6.0 dll
    jni java c++ 参数传递问题解决
    (转载)将h.264视频流封装成flv格式文件(二.开始动手)http://blog.csdn.net/yeyumin89/article/details/7932431
    达到最高效益的调度
    按照RFC3984协议实现H264视频流媒体
    语音识别 转载 待测试
    活动选择问题 动态规划算法(最大子集合或最大收益)
    整齐打印
  • 原文地址:https://www.cnblogs.com/oscar1987121/p/12207054.html
Copyright © 2011-2022 走看看