[Question] How to use TLS with AWS ALB type ingress? #10968
-
Hi Teams, I'm trying to get Kafka external endpoint working with TLS, but it seems like cannot work even I use keytool import AWS ALB ingress CA cert and Kafka cluster CA cert. Environment: Here's what I tried:
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: kafka-cluster
namespace: kafka
annotations:
strimzi.io/node-pools: enabled
strimzi.io/kraft: enabled
spec:
kafka:
version: 3.9.0
metadataVersion: 3.9.0
replicas: 3
resources:
requests:
memory: 2Gi
cpu: "1"
limits:
memory: 2Gi
cpu: "1"
logging:
type: inline
loggers:
rootLogger.level: INFO
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
- name: external
port: 9095
type: ingress
tls: true
configuration:
class: alb
bootstrap:
annotations:
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-xxxxxx, subnet-xxxxx
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-2:xxxxx:certificate/xxxxx
host: bootstrap.test.tech
brokers:
- broker: 0
annotations:
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-xxxxxx, subnet-xxxxx
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-2:xxxxx:certificate/xxxxx
host: broker-0.test.tech
- broker: 1
annotations:
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-xxxxxx, subnet-xxxxx
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-2:xxxxx:certificate/xxxxx
host: broker-1.test.tech
- broker: 2
annotations:
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-xxxxxx, subnet-xxxxx
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-2:xxxxx:certificate/xxxxx
host: broker-2.test.tech
jvmOptions:
-Xms: 1024m
-Xmx: 1024m
config:
offsets.topic.replication.factor: 3
transaction.state.log.replication.factor: 3
transaction.state.log.min.isr: 2
compression.type: "lz4"
default.replication.factor: 2
num.partitions: 16
min.insync.replicas: 2
log.retention.ms: 30000
log.roll.hours: 1
log.retention.check.interval.ms: 300000
entityOperator:
topicOperator:
watchedNamespace: kafka
reconciliationIntervalMs: 60000
resources:
requests:
memory: 256Mi
cpu: "0.5"
limits:
memory: 256Mi
cpu: "0.5"
logging:
type: inline
loggers:
rootLogger.level: INFO
userOperator:
watchedNamespace: kafka
reconciliationIntervalMs: 60000
resources:
requests:
memory: 256Mi
cpu: "0.5"
limits:
memory: 256Mi
cpu: "0.5"
logging:
type: inline
loggers:
rootLogger.level: INFO reproduce steps:
Script error: Questions:
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I don't think you can use it. As far as I know, Amazon ALB is a layer 7 load balancer for HTTP traffic. It cannot handle TCP traffic or TLS passthrough traffic. You need to use classic load balancers or NLBs. |
Beta Was this translation helpful? Give feedback.
It is not clear how is your client configured. I also doubt you should use
service.beta.kubernetes.io/aws-load-balancer-ssl-cert
? What do you expect that to do?