$ ./openshift-install create cluster --dir <installation_directory> \ (1)
--log-level=info (2)
You can install a cluster on Microsoft Azure that uses the default configuration options.
You can install OKD on a compatible cloud platform.
You can run the |
You have configured an account with the cloud platform that hosts your cluster.
You have the OKD installation program and the pull secret for your cluster.
You have an Azure subscription ID and tenant ID.
You have the application ID and password of a service principal.
Optional: If you have run the installation program on this computer before, and want to use an alternative service principal, go to the ~/.azure/
directory and delete the osServicePrincipal.json
configuration file.
Deleting this file prevents the installation program from automatically reusing subscription and authentication values from a previous installation.
Change to the directory that contains the installation program and initialize the cluster deployment:
$ ./openshift-install create cluster --dir <installation_directory> \ (1)
--log-level=info (2)
1 | For <installation_directory> , specify the
directory name to store the files that the installation program creates. |
2 | To view different installation details, specify warn , debug , or
error instead of info . |
When specifying the directory:
Verify that the directory has the execute
permission. This permission is required to run Terraform binaries under the installation directory.
Use an empty directory. Some installation assets, such as bootstrap X.509 certificates, have short expiration intervals, therefore you must not reuse an installation directory. If you want to reuse individual files from another cluster installation, you can copy them into your directory. However, the file names for the installation assets might change between releases. Use caution when copying installation files from an earlier OKD version.
Provide values at the prompts:
Optional: Select an SSH key to use to access your cluster machines.
For production OKD clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your |
Select azure as the platform to target.
If the installation program cannot locate the osServicePrincipal.json
configuration file from a previous installation, you are prompted for Azure subscription and authentication values.
Specify the following Azure parameter values for your subscription and service principal:
azure subscription id: Enter the subscription ID to use for the cluster.
azure tenant id: Enter the tenant ID.
azure service principal client id: Enter its application ID.
azure service principal client secret: Enter its password.
Select the region to deploy the cluster to.
Select the base domain to deploy the cluster to. The base domain corresponds to the Azure DNS Zone that you created for your cluster.
Enter a descriptive name for your cluster.
All Azure resources that are available through public endpoints are subject to resource name restrictions, and you cannot create resources that use certain terms. For a list of terms that Azure restricts, see Resolve reserved resource name errors in the Azure documentation. |
Paste the pull secret from Red Hat OpenShift Cluster Manager.
If you do not have a pull secret from Red Hat OpenShift Cluster Manager, you can paste the pull secret another private registry.
If you do not need the cluster to pull images from a private registry, you can paste {"auths":{"fake":{"auth":"aWQ6cGFzcwo="}}}
as the pull secret.
If previously not detected, the installation program creates an osServicePrincipal.json
configuration file and stores this file in the ~/.azure/
directory on your computer. This ensures that the installation program can load the profile when it is creating an OKD cluster on the target platform.
When the cluster deployment completes successfully:
The terminal displays directions for accessing your cluster, including a link to the web console and credentials for the kubeadmin
user.
Credential information also outputs to <installation_directory>/.openshift_install.log
.
Do not delete the installation program or the files that the installation program creates. Both are required to delete the cluster. |
...
INFO Install complete!
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com
INFO Login to the console with user: "kubeadmin", and password: "password"
INFO Time elapsed: 36m22s
|
You can log in to your cluster as a default system user by exporting the cluster kubeconfig
file.
The kubeconfig
file contains information about the cluster that is used by the CLI to connect a client to the correct cluster and API server.
The file is specific to a cluster and is created during OKD installation.
You deployed an OKD cluster.
You installed the oc
CLI.
Export the kubeadmin
credentials:
$ export KUBECONFIG=<installation_directory>/auth/kubeconfig (1)
1 | For <installation_directory> , specify the path to the directory that you stored
the installation files in. |
Verify you can run oc
commands successfully using the exported configuration:
$ oc whoami
system:admin
For more information about accessing and understanding the OKD web console, see Accessing the web console.
If necessary, you can opt out of remote health reporting.