9.4. IPv6 集群上的 Apache Kafka Cluster Operator 流
Apache Kafka Cluster Operator 的 Streams 不会在互联网协议版本 6 (IPv6)集群中启动。
临时解决方案
这个问题有两个临时解决方案。
临时解决方案:设置 KUBERNETES_MASTER 环境变量
显示 OpenShift Container Platform 集群的 Kubernetes master 节点地址:
oc cluster-info Kubernetes master is running at <master_address> # ...复制 master 节点的地址。
列出所有 Operator 订阅:
oc get subs -n <operator_namespace>编辑 Apache Kafka 的 Streams 的订阅资源:
oc edit sub amq-streams -n <operator_namespace>在
spec.config.env中,添加KUBERNETES_MASTER环境变量,设置为 Kubernetes master 节点的地址。例如:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: amq-streams namespace: <operator_namespace> spec: channel: amq-streams-1.8.x installPlanApproval: Automatic name: amq-streams source: mirror-amq-streams sourceNamespace: openshift-marketplace config: env: - name: KUBERNETES_MASTER value: MASTER-ADDRESS- 保存并退出编辑器。
检查
订阅是否已更新:oc get sub amq-streams -n <operator_namespace>检查 Cluster Operator
Deployment是否已更新为使用新环境变量:oc get deployment <cluster_operator_deployment_name>
临时解决方案:禁用主机名验证
列出所有 Operator 订阅:
oc get subs -n <operator_namespace>编辑 Apache Kafka 的 Streams 的订阅资源:
oc edit sub amq-streams -n <operator_namespace>在
spec.config.env中,添加KUBERNETES_DISABLE_HOSTNAME_VERIFICATION环境变量,设为true。例如:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: amq-streams namespace: <operator_namespace> spec: channel: amq-streams-1.8.x installPlanApproval: Automatic name: amq-streams source: mirror-amq-streams sourceNamespace: openshift-marketplace config: env: - name: KUBERNETES_DISABLE_HOSTNAME_VERIFICATION value: "true"- 保存并退出编辑器。
检查
订阅是否已更新:oc get sub amq-streams -n <operator_namespace>检查 Cluster Operator
Deployment是否已更新为使用新环境变量:oc get deployment <cluster_operator_deployment_name>