端口映射

-
2024-07-08
apiVersion: v1
kind: Pod
metadata:
  name: linux85-games-ketanglianxi-002
spec:
  # hostNetwork: true # 如果需要使用主机网络,取消注释这一行
  nodeName: k8s232.oldboyedu.com
  volumes:
  - name: data
    configMap:
      name: oldboyedu-linux85-games
      items:
      - key: nginx.conf
        path: nginx.conf
  containers:
  - name: game
    image: harbor.oldboyedu.com/oldboyedu-games/jasonyin2020/oldboyedu-games:v0.1
    volumeMounts:
    - name: data
      mountPath: /usr/local/nginx/conf/nginx.conf
      subPath: nginx.conf
    ports:
    - containerPort: 80
      hostIP: "0.0.0.0"
      hostPort: 88
      name: game
      protocol: TCP

苗世雷
地势坤君子厚德载物
公告

记录和学习
最新评论

加载中...