K8S/Kubernetes k8s 通过yaml文件创建service

k8s 通过yaml文件创建service

cat k8s-test-server-svc.yamlapiVersion: v1kind: Servicemetadata: name: k8s-test-server-svc namespace: k8s-testspec: type: NodePort selector: erp: k8s-test app: auth-server ports:...

cat k8s-test-server-svc.yaml

apiVersion: v1
kind: Service
metadata:
  name: k8s-test-server-svc
  namespace: k8s-test
spec:
  type: NodePort
  selector:
    erp: k8s-test
    app: auth-server
  ports:
  - port: 8100
    targetPort: 8100
    nodePort: 30017

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐

  • 浏览量 846
  • 收藏 0
  • 0

所有评论(0)

查看更多评论 
已为社区贡献5条内容