Kubernetes - How to expose 2 different containers in a pod?

后端 未结 2 1044
一向
一向 2021-02-04 07:31

I am trying to create a pod with 2 containers each having different images! Am not sure how to expose the two different containers to the client. Following is my yaml file for d

2条回答
  •  粉色の甜心
    2021-02-04 08:09

    You can actually do this in the command line:

    kubectl expose deployment xxx --port=8080,18000 --type=NodePort
    

    Set the ports just by a comma

提交回复
热议问题