Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 2.19 KB

hiveutil.md

File metadata and controls

49 lines (30 loc) · 2.19 KB

hiveutil

The hiveutil CLI offers several commands to help manage clusters with Hive.

To build the hiveutil binary, run make hiveutil.

Create Cluster

The create-cluster command generates a ClusterDeployment and submits it to the Hive cluster using your current kubeconfig.

To view what create-cluster generates, without submitting it to the API server, add -o yaml to create-cluster. If you need to make any changes not supported by create-cluster options, the output can be saved, edited, and then submitted with oc apply. This is also a useful way to generate sample yaml.

--release-image can be specified to control which OpenShift release image to use.

Create Cluster on AWS

Credentials will be read from your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. If the environment variables are missing or empty, then create-cluster will look for creds at ~/.aws/credentials. Alternatively you can specify an AWS credentials file with --creds-file.

bin/hiveutil create-cluster --base-domain=mydomain.example.com --cloud=aws mycluster

Create Cluster on Azure

Credentials will be read from ~/.azure/osServicePrincipal.json typically created via the az login command. Alternatively you can specify an Azure credentials file with --creds-file or the AZURE_AUTH_LOCATION environment variable.

bin/hiveutil create-cluster --base-domain=mydomain.example.com --cloud=azure --azure-base-domain-resource-group-name=myresourcegroup mycluster

Create Cluster on GCP

Credentials will be read from ~/.gcp/osServiceAccount.json, which can be created by:

  1. Login to GCP console at https://console.cloud.google.com/
  2. Create a service account with the owner role.
  3. Create a key for the service account.
  4. Select JSON for the key type.
  5. Download resulting JSON file and save to ~/.gcp/osServiceAccount.json.

Alternatively you can specify a GCP credentials file with --creds-file or the GCP_SHARED_CREDENTIALS_FILE environment variable.

bin/hiveutil create-cluster --base-domain=mydomain.example.com --cloud=gcp mycluster

Other Commands

To see other commands offered by hiveutil, run hiveutil --help.