Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Change namespace to messaging
- sed -i '' 's/namespace: .*/namespace: messaging/' install/cluster-operator/*RoleBinding*.yaml
- # Apply operator with system:admin impersonation
- kubectl apply -f install/cluster-operator -n messaging --as=system:admin
- # Change name of cluster to messaging and apply with system:admin impersonation
- kubectl apply -f examples/kafka/kafka-ephemeral.yaml --as=system:admin
- oc wait kafka/messaging --for=condition=Ready --timeout=300s -n messaging
- # The route name here points to messaging-kafka-external-bootstrap service listening at port 9094
- oc get routes messaging-kafka-bootstrap -o=jsonpath='{.status.ingress[0].host}{"\n"}'
- # Extract secret and add to trust store
- oc extract secret/messaging-cluster-ca-cert --keys=ca.crt --to=- > ca.crt
- keytool -import -trustcacerts -alias root -file ca.crt -keystore truststore.jks -storepass 123456 -noprompt
- # Test with console clients - kp and kc are symbolic links to producer and consumer clients respectively
- kp --broker-list messaging-kafka-bootstrap-messaging.192.168.99.100.nip.io:443 --producer-property security.protocol=SSL --producer-property ssl.truststore.password=123456 --producer-property ssl.truststore.location=truststore.jks --topic mytopic
- kc --bootstrap-server messaging-kafka-bootstrap-messaging.192.168.99.100.nip.io:443 --consumer-property security.protocol=SSL --consumer-property ssl.truststore.password=123456 --consumer-property ssl.truststore.location=truststore.jks --topic mytopic
Add Comment
Please, Sign In to add comment