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
更多推荐
已为社区贡献5条内容
所有评论(0)