ingress-nginx有了deployment修改hostport,这service不要了吧,这个service作用是什么
来源:7-5 传统dubbo服务迁移kubernetes(上)
zac707
2022-04-30
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
- name: https
port: 443
targetPort: 443
protocol: TCP
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
写回答
1回答
-
刘果国
2022-05-01
是的,svc的作用就是服务发现,如果选择host模式直接暴露服务就不需要svc的发现机制了
022022-05-02
相似问题