Created
September 27, 2023 22:55
-
-
Save lusoal/607e87085be374856a6a74e28b6d9574 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Creating cluster for tenant-1 | |
| echo "Creating Kafka cluster" | |
| kubectl apply -f ./kafka_cluster.yaml | |
| echo "Veryfing if the cluster is created or not" | |
| kubectl wait kafka/<YOUR_CLUSTER_NAME> -nstrimzi-kafka-operator --for=condition=Ready --timeout=100s | |
| # create a conditional to failure based on command output above using if statement | |
| if [ $? -eq 0 ] | |
| then | |
| echo "Cluster is created/updated" | |
| exit 0 | |
| else | |
| echo "Cluster creation failed" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment