Setting the security context of Kafka cluster components
The Kafka resource allows users to specify the security context at
the pod and container level with template
properties.
The Kafka resource allows users to specify the security context at the pod
and container level with template
properties.
#...
kind: Kafka
spec:
kafka:
template:
pod:
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
kafkaContainer:
securityContext:
# ...
cruiseControl:
template:
pod:
securityContext:
# ...
cruiseControlContainer:
# ...
In addition to Kafka, you can also set the security context of other Kafka cluster components configured in the Kafka resource in the same way.