Reboot a broker for an Amazon MSK cluster
Use this Amazon MSK operation when you want to reboot a broker for your
MSK cluster. To reboot a broker for a cluster, make sure that the cluster in the
ACTIVE
state.
The Amazon MSK service may reboot the brokers for your MSK cluster during system maintenance, such as patching or version upgrades. Rebooting a broker manually lets you test resilience of your Kafka clients to determine how they respond to system maintenance.
Reboot a broker for an Amazon MSK cluster using the Amazon Web Services Management Console
This process describes how to reboot a broker for a Amazon MSK cluster using the Amazon Web Services Management Console.
Open the Amazon MSK console at https://console.aws.amazon.com/msk/
. -
Choose the MSK cluster whose broker you want to reboot.
-
Scroll down to the Broker details section, and choose the broker you want to reboot.
-
Choose the Reboot broker button.
Reboot a broker for an Amazon MSK cluster using the Amazon CLI
This process describes how to reboot a broker for a Amazon MSK cluster using the Amazon CLI.
-
Run the following command, replacing
ClusterArn
with the Amazon Resource Name (ARN) that you obtained when you created your cluster, and theBrokerId
with the ID of the broker that you want to reboot.Note
The
reboot-broker
operation only supports rebooting one broker at a time.If you don't have the ARN for your cluster, you can find it by listing all clusters. For more information, see List Amazon MSK clusters.
If you don't have the broker IDs for your cluster, you can find them by listing the broker nodes. For more information, see list-nodes
. aws kafka reboot-broker --cluster-arn
ClusterArn
--broker-idsBrokerId
The output of this
reboot-broker
operation looks like the following JSON.{ "ClusterArn": "arn:aws:kafka:us-east-1:012345678012:cluster/exampleClusterName/abcdefab-1234-abcd-5678-cdef0123ab01-2", "ClusterOperationArn": "arn:aws:kafka:us-east-1:012345678012:cluster-operation/exampleClusterName/abcdefab-1234-abcd-5678-cdef0123ab01-2/0123abcd-abcd-4f7f-1234-9876543210ef" }
-
To get the result of the
reboot-broker
operation, run the following command, replacingClusterOperationArn
with the ARN that you obtained in the output of thereboot-broker
command.aws kafka describe-cluster-operation --cluster-operation-arn
ClusterOperationArn
The output of this
describe-cluster-operation
command looks like the following JSON example.{ "ClusterOperationInfo": { "ClientRequestId": "c0b7af47-8591-45b5-9c0c-909a1a2c99ea", "ClusterArn": "arn:aws:kafka:us-east-1:012345678012:cluster/exampleClusterName/abcdefab-1234-abcd-5678-cdef0123ab01-2", "CreationTime": "2019-09-25T23:48:04.794Z", "OperationArn": "arn:aws:kafka:us-east-1:012345678012:cluster-operation/exampleClusterName/abcdefab-1234-abcd-5678-cdef0123ab01-2/0123abcd-abcd-4f7f-1234-9876543210ef", "OperationState": "REBOOT_IN_PROGRESS", "OperationType": "REBOOT_NODE", "SourceClusterInfo": {}, "TargetClusterInfo": {} } }
When the reboot operation is complete, the OperationState
is REBOOT_COMPLETE
.
Reboot a broker for an Amazon MSK cluster using the using the API
To reboot a broker in a cluster using the API, see RebootBroker.