Guest User

Untitled

a guest
Oct 7th, 2019
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.46 KB | None | 0 0
  1. # Change namespace to messaging
  2. sed -i '' 's/namespace: .*/namespace: messaging/' install/cluster-operator/*RoleBinding*.yaml
  3. # Apply operator with system:admin impersonation
  4. kubectl apply -f install/cluster-operator -n messaging --as=system:admin
  5. # Change name of cluster to messaging and apply with system:admin impersonation
  6. kubectl apply -f examples/kafka/kafka-ephemeral.yaml --as=system:admin
  7. oc wait kafka/messaging --for=condition=Ready --timeout=300s -n messaging
  8. # The route name here points to messaging-kafka-external-bootstrap service listening at port 9094
  9. oc get routes messaging-kafka-bootstrap -o=jsonpath='{.status.ingress[0].host}{"\n"}'
  10. # Extract secret and add to trust store
  11. oc extract secret/messaging-cluster-ca-cert --keys=ca.crt --to=- > ca.crt
  12. keytool -import -trustcacerts -alias root -file ca.crt -keystore truststore.jks -storepass 123456 -noprompt
  13. # Test with console clients - kp and kc are symbolic links to producer and consumer clients respectively
  14. 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
  15. 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