Connecting to Hazelcast Cloud with Hazelcast CLC
To use the Hazelcast CLC with Hazelcast Cloud, you need to authenticate with Cloud using your API secret and key. You can then import the configuration of the cluster that you want to connect to. No additional configuration is required.
Authenticating with Cloud
To allow the Hazelcast CLC to do cluster operations, you must generate a Cloud token.
-
Execute the following command to retrieve the token.
clc cloud login
-
When prompted, enter your API key and secret. If both are correct, the token is retrieved and saved.
List Accessible Clusters
Run the following command to list the clusters linked to your Cloud account:
clc cloud list-clusters
For each cluster, the following attributes are displayed in order: Cluster ID, Cluster Name, Current Status, Hazelcast Version.
Importing the Cluster Configuration
Import the configuration of the Cloud cluster that you want to connect to.
-
Run the following command to save the cluster configuration with the name
dev
. Replace the$CLUSTER_NAME
placeholder with the name of your cluster.clc cloud import-config $CLUSTER-NAME --name dev
-
Start an interactive shell session.
clc -c dev
The Hazelcast CLC will start in interactive mode, and you should see a command prompt. You’re ready to start managing Cloud clusters.
The Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query. |