May 26, 2022

Getting Started with Red Hat OpenShift Local (formerly Red Hat CodeReady Containers, CRC)

2.3. Installing CRC- https://crc.dev/crc/#installing_gsg

After download have 2 files:

  • /home/magnuskkarlsson/Downloads/crc-linux-amd64.tar.xz
  • /home/magnuskkarlsson/Downloads/pull-secret
$ cd ~/Downloads
$ tar xvf crc-linux-amd64.tar.xz
$ mkdir -p ~/bin
$ cp ~/Downloads/crc-linux-*-amd64/crc ~/bin
$ crc version
CRC version: 2.3.0+dab5e0d
OpenShift version: 4.10.12
Podman version: 3.4.4

2.6. Upgrading CRC - https://crc.dev/crc/#upgrading_gsg

3.2. Setting up CRC

$ crc setup
$ crc start --pull-secret-file ~/Downloads/pull-secret
...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as administrator:
  Username: kubeadmin
  Password: ggNNE-tdBvf-Se8j5-yT8nF

Log in as user:
  Username: developer
  Password: developer

Use the 'oc' command line interface:
  $ eval $(crc oc-env)
  $ oc login -u developer https://api.crc.testing:6443

Testing

$ eval $(crc oc-env)

$ oc login -u developer https://api.crc.testing:6443

$ oc completion -h
...
  # Installing bash completion on Linux
  ## If bash-completion is not installed on Linux, install the 'bash-completion' package
  ## via your distribution's package manager.
  ## Load the oc completion code for bash into the current shell
  source <(oc completion bash)
...
$ source <(oc completion bash)

$ crc console --credentials
To login as a regular user, run 'oc login -u developer -p developer https://api.crc.testing:6443'.
To login as an admin, run 'oc login -u kubeadmin -p ggNNE-tdBvf-Se8j5-yT8nF https://api.crc.testing:6443'

$ oc get clusterversions
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.12   True        False         18d     Cluster version is 4.10.12

$ oc get nodes
NAME                 STATUS   ROLES           AGE   VERSION
crc-xhphl-master-0   Ready    master,worker   19d   v1.23.5+70fb84c

$ crc console --url
https://console-openshift-console.apps-crc.testing

Other resources:

https://github.com/code-ready/crc

No comments: