handsome-park-80602
06/02/2023, 5:45 PMYou'll need to copy the values of sasl.jaas.config and <http://basic.auth.user.info|basic.auth.user.info> for the next step.
The next step is to create K8s secrets containing the config values you've just generated. Specifically, you can run the following commands:
kubectl create secret generic confluent-secrets --from-literal=sasl_jaas_config="<your-sasl.jaas.config>"
kubectl create secret generic confluent-secrets --from-literal=basic_auth_user_info="<your-basic.auth.user.info>"
With your config values substituted as appropriate. For example, in our case we'd run:
kubectl create secret generic confluent-secrets --from-literal=sasl_jaas_config="org.apache.kafka.common.security.plain.PlainLoginModule required username='XFA45EL1QFUQP4PA' password='ltyf96EvR1YYutsjLB3ZYfrk+yfCXD8sQHCE3EMp57A2jNs4RR7J1bU9k6lM6rU';"
kubectl create secret generic confluent-secrets --from-literal=basic_auth_user_info="P2ETAN5QR2LCWL14:RTjqw7AfETDl0RZo/7R0123LhPYs2TGjFKmvMWUFnlJ3uKubFbB1Sfs7aOjjNi1m23"
when I try to execute
kubectl create secret generic confluent-secrets --from-literal=basic_auth_user_info="<your-basic.auth.user.info>"
after executing
kubectl create secret generic confluent-secrets --from-literal=sasl_jaas_config="<your-sasl.jaas.config>"
I get the error failed to create secret secrets "confluent-secrets" already exists
the syntax should rather be
https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/#use-raw-data
kubectl create secret generic db-user-pass \
--from-literal=hello=world \
--from-literal=foo=bar