Skip to content

fix(docs): Update getting-started script pre-24.11 #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default

echo "Install KafkaCluster from kafka.yaml"
# tag::install-kafka[]
kubectl apply -f kafka.yaml
kubectl apply --server-side -f kafka.yaml
# end::install-kafka[]

sleep 15
Expand All @@ -99,7 +99,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
echo "Starting port-forwarding of port 9092"
# shellcheck disable=2069 # we want all output to be blackholed
# tag::port-forwarding[]
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
kubectl port-forward svc/simple-kafka-broker-default-bootstrap 9092 2>&1 >/dev/null &
# end::port-forwarding[]
PORT_FORWARD_PID=$!
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
Expand All @@ -114,12 +114,12 @@ echo "some test data" > data

echo "Writing test data"
# tag::kcat-write-data[]
kafkacat -b localhost:9092 -t test-data-topic -P data
kcat -b localhost:9092 -t test-data-topic -P data
# end::kcat-write-data[]

echo "Reading test data"
# tag::kcat-read-data[]
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
# end::kcat-read-data[]

echo "Check contents"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default

echo "Install KafkaCluster from kafka.yaml"
# tag::install-kafka[]
kubectl apply -f kafka.yaml
kubectl apply --server-side -f kafka.yaml
# end::install-kafka[]

sleep 15
Expand All @@ -99,7 +99,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
echo "Starting port-forwarding of port 9092"
# shellcheck disable=2069 # we want all output to be blackholed
# tag::port-forwarding[]
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
kubectl port-forward svc/simple-kafka-broker-default-bootstrap 9092 2>&1 >/dev/null &
# end::port-forwarding[]
PORT_FORWARD_PID=$!
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
Expand All @@ -114,12 +114,12 @@ echo "some test data" > data

echo "Writing test data"
# tag::kcat-write-data[]
kafkacat -b localhost:9092 -t test-data-topic -P data
kcat -b localhost:9092 -t test-data-topic -P data
# end::kcat-write-data[]

echo "Reading test data"
# tag::kcat-read-data[]
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
# end::kcat-read-data[]

echo "Check contents"
Expand Down
12 changes: 10 additions & 2 deletions docs/modules/kafka/examples/getting_started/kafka.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
apiVersion: listeners.stackable.tech/v1alpha1
kind: ListenerClass
metadata:
name: external-unstable-ip
spec:
serviceType: NodePort
preferredAddressType: IP
---
apiVersion: kafka.stackable.tech/v1alpha1
kind: KafkaCluster
metadata:
Expand All @@ -12,8 +20,8 @@ spec:
zookeeperConfigMapName: simple-kafka-znode
brokers:
config:
bootstrapListenerClass: external-unstable # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
brokerListenerClass: external-unstable # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
bootstrapListenerClass: external-unstable-ip # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
brokerListenerClass: external-unstable-ip # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
roleGroups:
default:
replicas: 3
Loading