- Kubernetes:A Complete DevOps Cookbook
- Murat Karslioglu
- 213字
- 2025-04-04 13:20:39
Provisioning an OpenShift cluster
In this recipe, we will use the AWS platform to deploy OpenShift:
- To get your OpenShift cluster up, use the following command:
$ ./openshift-install create cluster
- Choose aws as your platform and enter your AWS Access Key ID and Secret Access Key.
- Choose your region. In our example, this is us-east-1.
- Select a base domain. In our example, this is k8s.containerized.me.
- Enter a cluster name.
- Copy Pull Secret from the Red Hat site and paste it onto the command line:
- After the installation is complete, you will see the console URL and credentials for accessing your new cluster, similar to the following:
INFO Install complete!
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/ubuntu/auth/kubeconfig'
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.os.k8s.containerized.me
INFO Login to the console with user: kubeadmin, password: ABCDE-ABCDE-ABCDE-ABCDE
- Switch to the Red Hat site and click on the Download Command-Line Tools link to download openshift-client.
- Extract the openshift-client files in your workstation:
$ tar -xzf openshift-client-linux-*.tar.gz && sudo mv oc /usr/local/bin
The preceding command will create the kubectl and oc files on the same folder and move the oc binary to PATH.