Skip to content
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

docs(refactor): brings the custom resource content together #9572

Merged
merged 1 commit into from
Jan 21, 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 @@ -12,3 +12,12 @@ include::../../shared/snip-intro-custom-resources.adoc[leveloffset=+1]

//Example custom resource showing configuration options
include::../../modules/deploying/con-deploy-custom-resources-example.adoc[leveloffset=+1]

//accessing resource information
include::../../modules/managing/con-custom-resources-info.adoc[leveloffset=+1]

//reference table for resource status
include::../../modules/managing/con-custom-resources-status.adoc[leveloffset=+1]

//procedure to check status of a resources
include::../../modules/managing/proc-accessing-resource-status.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
Managing Strimzi requires performing various tasks to keep the Kafka clusters and associated resources running smoothly.
Use `kubectl` commands to check the status of resources, configure maintenance windows for rolling updates, and leverage tools such as the Strimzi Drain Cleaner and Kafka Static Quota plugin to manage your deployment effectively.

//using kubectl commands and status
include::assembly-working-with-resources.adoc[leveloffset=+1]

//discover internal bootstrap service and HTTP Bridge
include::../../modules/managing/con-service-discovery.adoc[leveloffset=+1]

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[id='con-custom-resources-info-{context}']
= Performing `kubectl` operations on custom resources

[role="_abstract"]
You can use `kubectl` commands to retrieve information and perform other operations on Strimzi custom resources.
Use `kubectl` commands, such as `get`, `describe`, `edit`, or `delete`, to perform operations on resource types.
For example, `kubectl get kafkatopics` retrieves a list of all Kafka topics and `kubectl get kafkas` retrieves all deployed Kafka clusters.

Expand All @@ -15,6 +17,7 @@ You can also use the _short name_ of the resource.
Learning short names can save you time when managing Strimzi.
The short name for `Kafka` is `k`, so you can also run `kubectl get k` to list all Kafka clusters.

.Listing Kafka clusters
[source,shell]
----
kubectl get k
Expand Down Expand Up @@ -50,6 +53,7 @@ All Strimzi custom resources belong to the category `strimzi`, so you can use `s

For example, running `kubectl get strimzi` lists all Strimzi custom resources in a given namespace.

.Listing all custom resources
[source,shell]
----
kubectl get strimzi
Expand All @@ -67,6 +71,7 @@ kafkauser.kafka.strimzi.io/my-user tls simple
The `kubectl get strimzi -o name` command returns all resource types and resource names.
The `-o name` option fetches the output in the _type/name_ format

.Listing all resource types and names
[source,shell]
----
kubectl get strimzi -o name
Expand All @@ -79,6 +84,7 @@ kafkauser.kafka.strimzi.io/my-user
You can combine this `strimzi` command with other commands.
For example, you can pass it into a `kubectl delete` command to delete all resources in a single command.

.Deleting all custom resources
[source,shell]
----
kubectl delete $(kubectl get strimzi -o name)
Expand All @@ -105,8 +111,9 @@ A JSONPath expression can extract or navigate specific parts of any resource.
For example, you can use the JSONPath expression `{.status.listeners[?(@.name=="tls")].bootstrapServers}`
to get the bootstrap address from the status of the Kafka custom resource and use it in your Kafka clients.

Here, the command finds the `bootstrapServers` value of the listener named `tls`:
Here, the command retrieves the `bootstrapServers` value of the listener named `tls`:

.Retrieving the bootstrap address
[source,shell]
----
kubectl get kafka my-cluster -o=jsonpath='{.status.listeners[?(@.name=="tls")].bootstrapServers}{"\n"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[id='proc-accessing-resource-status-{context}']
= Finding the status of a custom resource

This procedure describes how to find the status of a custom resource.
[role="_abstract"]
Use `kubectl` with the `status` subresource of a custom resource to retrieve information about the resource.

.Prerequisites

Expand All @@ -27,5 +28,4 @@ Using the `jq` {JQTool} makes it easier to read the output.

[role="_additional-resources"]
.Additional resources
* xref:con-custom-resources-status-{context}[]
* For more information about using JSONPath, see {K8SJsonPath}.
4 changes: 2 additions & 2 deletions documentation/shared/snip-intro-custom-resources.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//standard custom resources intro text
Deployment of Kafka components to a Kubernetes cluster using Strimzi is highly configurable through the application of custom resources.
These custom resources are created as instances of APIs added by Custom Resource Definitions (CRDs) to extend Kubernetes resources.
The deployment of Kafka components onto a Kubernetes cluster using Strimzi is highly configurable through the use of custom resources.
These resources are created as instances of APIs introduced by Custom Resource Definitions (CRDs), which extend Kubernetes resources.

CRDs act as configuration instructions to describe the custom resources in a Kubernetes cluster,
and are provided with Strimzi for each Kafka component used in a deployment, as well as users and topics.
Expand Down
Loading