参照以下舵图:https://github.com/confluentinc/cp-helm-charts
我正在尝试使模式注册表对k8s集群中的pod可用。为此,我在values.yaml和service.yaml中添加了一个nodeport:
值.yaml:
## External access.
##
external:
enabled: true
# type can be either NodePort or LoadBalancer
type: NodePort
nodePort: 31095
服务.yaml:
spec:
ports:
- name: schema-registry
port: {{ .Values.servicePort }}
nodePort: {{ .Values.external.node_port }}
部署图表时,节点端口不会出现:
kubectl get svc cp-schema-registry -n kafka-namespace
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
cp-schema-registry ClusterIP 10.4.26.199 <none> 8081/TCP 34m
1条答案
按热度按时间zbdgwd5y1#
这是由service.yaml文件中的一个输入错误引起的。在值文件中,我们有:
service.yaml是指节点端口的值:节点端口,它在values.yaml中不存在。将此更改为:
解决了这个问题。