# 通过配置yaml文件固定端口 
apiVersion: v1
kind: Service
metadata:
  name: cmdb-portal
  namespace: cmdbv1
spec:
  selector:
    app: cmdb
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8090
      nodePort: 30311
  # 网络类型
  type: NodePort
