zoukankan      html  css  js  c++  java
  • k8s pod 定义 文件 yaml

    # yaml格式的pod定义文件完整内容:
    apiVersion: v1       #必选,版本号,例如v1
    kind: Pod       #必选,Pod
    metadata:       #必选,元数据
      name: intellect1       #必选,Pod名称
      namespace: app #必选,Pod所属的命名空间
      labels:      #自定义标签
        - name: intellect1       #自定义标签名字
      annotations:       #自定义注释列表
        - name: intellect1  
    spec:         #必选,Pod中容器的详细定义
      containers:      #必选,Pod中容器列表
      - name: intellect1     #必选,容器名称
        image: 192.168.190.126:5000/app/intellect:latest    #必选,容器的镜像名称
        imagePullPolicy: Always    
        ports:       #需要暴露的端口库号列表
        - name: P3000     #端口号名称
          containerPort: 3000   #容器需要监听的端口号
          hostPort: 31300    #容器所在主机需要监听的端口号,默认与Container相同
          protocol: TCP     #端口协议,支持TCP和UDP,默认TCP
  • 相关阅读:
    Go map 切片
    Go map 增删改查和遍历
    Go map 基本使用
    Go 二维数组
    Go 切片
    Go 数组
    Go 错误处理 defer recover panic
    Go time模块
    5分钟入门MP4文件格式
    写盘工具
  • 原文地址:https://www.cnblogs.com/Leechg/p/14303899.html
Copyright © 2011-2022 走看看