【问题标题】:How do I specify a nodePort for Confluent Schema Registry?如何为 Confluent Schema Registry 指定 nodePort?
【发布时间】:2020-04-25 19:36:56
【问题描述】:

参考下面的舵图: https://github.com/confluentinc/cp-helm-charts

我正在尝试使 k8s 集群中的 pod 可以使用架构注册表。为此,我在 values.yaml 和 service.yaml 中添加了一个 nodePort:

values.yaml:

## External access.
##
external:
  enabled: true
  # type can be either NodePort or LoadBalancer
  type: NodePort
  nodePort: 31095

service.yaml:

spec:
  ports:
    - name: schema-registry
      port: {{ .Values.servicePort }}
      nodePort: {{ .Values.external.node_port }}

当我部署图表时,nodePort 没有出现:

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

【问题讨论】:

    标签: apache-kafka confluent-platform confluent-schema-registry


    【解决方案1】:

    这是由 service.yaml 文件中的拼写错误引起的。在我们的值文件中:

    external:
      enabled: true
      # type can be either NodePort or LoadBalancer
      type: NodePort
      nodePort: 31095
    

    service.yaml 指的是节点端口的值:node_port,在 values.yaml 中不存在。将其更改为:

    nodePort: {{ .Values.external.nodePort }}
    

    修复了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-04
      • 2019-05-01
      • 2023-01-11
      • 1970-01-01
      • 2019-07-21
      • 2019-07-21
      • 2017-10-06
      • 2019-11-06
      相关资源
      最近更新 更多