Create an SSH key pair

To enable encrypted communications with your cluster, you must create an asymmetric key pair (a public and a private key) and associate it with your control plane or node pool virtual machines.

To generate an asymmetric key pair, run the following command:

ssh-keygen -t rsa -m PEM -b 4096 -C "COMMENT" \
    -f SSH_PRIVATE_KEY -N "" 1>/dev/null

Replace the following:

  • SSH_PRIVATE_KEY: a file name to save the key in
  • COMMENT: a text string describing the key

This creates two files: SSH_PRIVATE_KEY containing your SSH private key, and containing the corresponding public key.

To save your SSH public key into an environment variable, run the following command:


What's next