Skip to content

Commit

Permalink
DOC-822 Use rpk to connect to Schema Registry in K8s Pods (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSCahill authored Dec 10, 2024
1 parent ae009bf commit ff00f47
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ For details, see xref:get-started:licensing/add-license-redpanda/kubernetes.adoc
[source,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm install redpanda redpanda/redpanda \
--version {latest-redpanda-helm-chart-version} \ <1>
--namespace <namespace> \ <2>
Expand Down Expand Up @@ -286,6 +287,7 @@ Helm + Operator::
[,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm upgrade --install redpanda-controller redpanda/operator \
--namespace <another-namespace> \
--set image.tag={latest-operator-version} \
Expand Down Expand Up @@ -338,6 +340,7 @@ NOTE: Make sure to use unique node ports for the listeners in your Redpanda reso
[source,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm install redpanda-two redpanda/redpanda \
--version {latest-redpanda-helm-chart-version} \
--namespace <anothernamespace> \
Expand Down Expand Up @@ -391,6 +394,7 @@ Helm::
[source,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm install redpanda redpanda/redpanda \
--version {latest-redpanda-helm-chart-version} \
--namespace <namespace> \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ include::deploy:partial$kubernetes/install-crds.adoc[]
[,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update redpanda
helm upgrade --install redpanda-controller redpanda/operator \
--namespace <namespace> \
--set image.tag={latest-operator-version} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ include::deploy:partial$kubernetes/install-crds.adoc[]
[,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm upgrade --install redpanda-controller redpanda/operator \
--namespace <namespace> \
--set image.tag={latest-operator-version} \
Expand Down Expand Up @@ -139,6 +140,7 @@ TLS is enabled by default. The Redpanda Helm chart uses cert-manager to manage T
[source,bash,subs="attributes+",lines=3+5-9]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm install redpanda redpanda/redpanda \
--version {latest-redpanda-helm-chart-version} \
--namespace <namespace> --create-namespace \
Expand Down
1 change: 1 addition & 0 deletions modules/get-started/pages/install-beta.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Install Redpanda with Helm from the RC build in https://hub.docker.com/r/redpand
[source,bash,subs="attributes+"]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm install redpanda redpanda/redpanda \
--namespace <namespace> \
--create-namespace --set image.repository=docker.redpanda.com/redpandadata/redpanda-unstable --set image.tag={redpanda-beta-tag}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ To install the Decommission controller as part of the Redpanda Operator:
[,bash,subs="attributes+"lines=7+8]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm upgrade --install redpanda-controller redpanda/operator \
--namespace <namespace> \
--set image.tag={latest-operator-version} \
Expand Down
1 change: 1 addition & 0 deletions modules/manage/pages/kubernetes/k-scale-redpanda.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ To install the Nodewatcher controller as part of the Redpanda Operator:
[,bash,subs="attributes+",lines=7+8]
----
helm repo add redpanda https://charts.redpanda.com
helm repo update
helm upgrade --install redpanda-controller redpanda/operator \
--namespace <namespace> \
--set image.tag={latest-operator-version} \
Expand Down
21 changes: 15 additions & 6 deletions modules/manage/pages/kubernetes/k-schema-controller.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,26 @@ When the manifest is applied, the schema will be created in your Redpanda cluste
+
[,bash]
----
kubect get schema example-schema --namespace <namespace>
kubectl get schema example-schema --namespace <namespace>
----

. Create an alias to simplify running `rpk` commands on your cluster:
+
[,bash]
----
alias internal-rpk="kubectl --namespace <namespace> exec -i -t <pod-name> -c redpanda -- rpk"
----
+
Replace `<pod-name>` with the name of a Pod that's running Redpanda.

. Verify that the schema was created in Redpanda:
+
[source,bash]
----
kubectl exec -it --namespace <namespace> <pod-name> -- curl https://<pod-name>.<cluster-name>.<namespace>.svc.cluster.local:8081/subjects -sS --cacert /etc/tls/certs/default/ca.crt -w '\n'
internal-rpk registry subject list
----
+
Replace `<pod-name>` with the name of a Pod that's running Redpanda.
You should see `example-schema` in the output.

== Schema examples

Expand Down Expand Up @@ -244,8 +253,8 @@ You can also check specific versions of the schema:

[source,bash]
----
kubectl exec -it --namespace <namespace> <pod-name> -- curl https://<pod-name>.<cluster-name>.<namespace>.svc.cluster.local:8081/schemas/ids/1 -sS --cacert /etc/tls/certs/default/ca.crt -w '\n'
kubectl exec -it --namespace <namespace> <pod-name> -- curl https://<pod-name>.<cluster-name>.<namespace>.svc.cluster.local:8081/schemas/ids/2 -sS --cacert /etc/tls/certs/default/ca.crt -w '\n'
internal-rpk registry schema get --id 1
internal-rpk registry schema get --id 2
----

== Delete a schema
Expand All @@ -261,7 +270,7 @@ Verify that the schema was deleted by checking the Redpanda Schema Registry:

[source,bash]
----
kubectl exec -it --namespace <namespace> <pod-name> -- curl https://<pod-name>.<cluster-name>.<namespace>.svc.cluster.local:8081/subjects -sS --cacert /etc/tls/certs/default/ca.crt -w '\n'
internal-rpk registry subject list
----

== Suggested reading
Expand Down
Loading

0 comments on commit ff00f47

Please sign in to comment.