Cách Cài OKD
Cách Cài OKD
yum update -y
cd
cd okd4_files
wget https://github.com/openshift/okd/releases/download/4.10.0-0.okd-2022-07-09-073606/
openshift-install-linux-4.10.0-0.okd-2022-07-09-073606.tar.gz
wget https://github.com/openshift/okd/releases/download/4.10.0-0.okd-2022-07-09-073606/
openshift-client-linux-4.10.0-0.okd-2022-07-09-073606.tar.gz
oc version
openshift-install version
ssh-keygen
cd
mkdir install_dir
cp okd4_files/install-config.yaml ./install_dir
vim ./install_dir/install-config.yaml
cp ./install_dir/install-config.yaml ./install_dir/install-config.yaml.bak
openshift-install coreos print-stream-json | grep '\.iso[^.]' # sau đó tải bản iso mới nhất khi list ra được
boot các máy theo worker master bootstrap trên mỗi máy chạy lệnh
Ví dụ node bootstrap
node master
node worker
remove the bootstap thì tắt serserver bootstrap đi khi có thông báo như hình
đợi tầm 30 đến 50 phút thì cụm okd sẽ run lên ok sau đó remove server bootstrap ra khỏi haproxy
export KUBECONFIG=~/install_dir/auth/kubeconfig
oc whoami
oc get nodes
oc get csr
wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x jq
sudo mv jq /usr/local/bin/
jq –version
oc get clusteroperators # check các thành phần đang start của cụm okd
Khi nào cột available true hết là run thành cồn cụm okd. Phần này thường đợi khá lâu
link login
https://console-openshift-console.apps.lab.okd.local/
oc create -f okd4_files/registry_pv.yaml
oc get pv
oc edit configs.imageregistry.operator.openshift.io
Sửa lại như ảnh
oc get pv