The hiveutil
CLI offers several commands to help manage clusters with Hive.
To build the hiveutil
binary, run make hiveutil
.
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.
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
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
Credentials will be read from ~/.gcp/osServiceAccount.json
, which can be created by:
- Login to GCP console at https://console.cloud.google.com/
- Create a service account with the owner role.
- Create a key for the service account.
- Select JSON for the key type.
- 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
To see other commands offered by hiveutil
, run hiveutil --help
.