[redhat@ocp4 ~]$ crc setup
INFO Using bundle path /home/redhat/.crc/cache/crc_libvirt_4.11.18_amd64.crcbundle
...output omitted...
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
3. 啟動 OpenShift
啟動虛擬機實例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[redhat@ocp4 ~]$ crc start
INFO Checking if running as non-root
INFO Checking if running inside WSL2
...output omitted...
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: 8d2St-FguQp-xTNFd-S58tI
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
啟動完畢驗證 OpenShift 是否正常運作
1
2
3
4
5
6
7
8
9
10
11
# 檢查節點是否 Ready
redhat@ocp4 ~]$ oc get no
NAME STATUS ROLES AGE VERSION
crc-pbwlw-master-0 Ready master,worker 46d v1.24.6+5658434
# 檢查所有的 Cluster Operator 是否可用
[redhat@ocp4 ~]$ oc get co
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
authentication 4.11.18 True False False 4m16s
config-operator 4.11.18 True False False 46d
console 4.11.18 True False False 19m
...output omitted...