- Download form https://crc.dev/crc/
wget https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
- Start CRC
crc setup
crs start -m 32768 -c 8 # for example a 32GiB with 8 cpus
- Install haproxy
sudo dnf -y install haproxy policycoreutils-python-utils jq
- Stop firewalld (or add rules to allow 80, 443, 6443)
sudo systemctl stop firewalld
sudo systemctl disable firewalld
- Set selinux for permissive
sudo setenforce 0
- Set haproxy config where
10.9.113.12
is your external server IP and192.168.130.11
is IP of CRC virtual machine. To discover CRC IP:crc ip
To discover IP of your host:hostname --ip-address
cat <EOF>> /tmp/haproxy.cfg
global
debug
defaults
log global
mode http
timeout connect 5000
timeout client 5000
timeout server 5000
frontend apps
bind 10.9.113.12:80
option tcplog
mode tcp
default_backend apps
backend apps
mode tcp
balance roundrobin
option ssl-hello-chk
server webserver1 192.168.130.11:80 check
frontend apps-https
bind 10.9.113.12:443
option tcplog
mode tcp
default_backend apps-https
backend apps-https
mode tcp
balance roundrobin
option ssl-hello-chk
server webserver1 192.168.130.11:443 check
frontend api
bind 10.9.113.12:6443
option tcplog
mode tcp
default_backend api
backend api
mode tcp
balance roundrobin
option ssl-hello-chk
server webserver1 192.168.130.11:6443 check
EOF
sudo cp /tmp/haproxy.cfg /etc/haproxy/haproxy.cfg
sudo systemctl start haproxy
- Add to your
/etc/hosts
:
# CRC openshift
10.9.113.12 api.crc.testing api-int.crc.testing apps-crc.testing canary-openshift-ingress-canary.apps-crc.testing console-openshift-console.apps-crc.testing default-route-openshift-image-registry.apps-crc.testing downloads-openshift-console.apps-crc.testing oauth-openshift.apps-crc.testing
Where 10.9.113.12
is your external host IP.
- Download
oc
client from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/ and authenticate: Discover your credentials bycrc console --credentials
oc login -u kubeadmin -p <kubeadmin password> https://api.crc.testing:6443
or as a regular user:
oc login -u developer -p developer https://api.crc.testing:6443
- Open page in your browser: https://console-openshift-console.apps-crc.testing