Offline Apinizer Installation on RHEL 9.2
This document explains the installation of Kubernetes version 1.24.10 on a server with RHEL (Red Hat Enterprise Linux) 9.2 operating system.
File to Download
offlineApinizerInstallation-RHEL9.2.tar (830 MB)
https://drive.google.com/file/d/18fWhCZzh4FykLImrGwN83OHtN2zi62uG/view?usp=sharing
The packages created in .tar format on the online machine should be transferred to the offline machine.
sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo setenforce 0
sudo sed
-i
's/^SELINUX=enforcing$/SELINUX=permissive/'
/etc/selinux/config
sudo swapoff
-a
sudo vi /etc/fstab
sudo tar xvf offlineApinizerInstallation-RHEL9.2.tar
Installing Containerd Packages
yum install -y --cacheonly --disablerepo=* required_rpms/*.rpm --skip-broken
#containerd settings
sudo mkdir -p /etc/containerd
sudo containerd config default | sudo tee /etc/containerd/config.toml
sudo sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml
#initializing and starting the containerd module
sudo systemctl restart containerd
sudo systemctl enable containerd
systemctl status containerd
Installing Kubernetes Packages
sudo modprobe overlay
sudo modprobe br_netfilter
sudo tee /etc/modules-load.d/k8s.conf <<EOF
overlay
br_netfilter
EOF
sudo vi /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward=1
net.ipv4.tcp_max_syn_backlog=40000
net.core.somaxconn=40000
net.core.wmem_default=8388608
net.core.rmem_default=8388608
net.ipv4.tcp_sack=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_keepalive_intvl=30
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_moderate_rcvbuf=1
net.core.rmem_max=134217728
net.core.wmem_max=134217728
net.ipv4.tcp_mem=134217728 134217728 134217728
net.ipv4.tcp_rmem=4096 277750 134217728
net.ipv4.tcp_wmem=4096 277750 134217728
net.core.netdev_max_backlog=300000
sudo sysctl --system
sudo yum install -y --cacheonly --disablerepo=* kube_rpms/*.rpm
systemctl enable --now kubelet.service
#Kubernetes installation control
kubectl version --client && kubeadm version
Installing Kubernetes Images
sudo ctr --namespace k8s.io images import kube_images/kube-apiserver_v1.24.10.tar
sudo ctr --namespace k8s.io images import kube_images/kube-controller-manager_v1.24.10.tar
sudo ctr --namespace k8s.io images import kube_images/kube-scheduler_v1.24.10.tar
sudo ctr --namespace k8s.io images import kube_images/kube-proxy_v1.24.10.tar
sudo ctr --namespace k8s.io images import kube_images/pause_3.7.tar
sudo ctr --namespace k8s.io images import kube_images/etcd_3.5.6-0.tar
sudo ctr --namespace k8s.io images import kube_images/coredns_v1.8.6.tar
sudo ctr --namespace k8s.io images import kube_images/flannel-cni-plugin_v1.1.2.tar
sudo ctr --namespace k8s.io images import kube_images/flannel_v0.20.2.tar
# Must be installed in case of error.
sudo ctr --namespace k8s.io images import kube_images/pause_3.6.tar
sudo ctr --namespace k8s.io images import kube_images/flannel_v0.24.2.tar
sudo ctr --namespace k8s.io images import kube_images/flannel-cni-plugin_v1.4.0-flannel1.tar
Important: Make sure to perform DNS resolution with "nslookup" before initiating with kubeadm.
This node will be chosen as the Kubernetes Control Plane since it is the first node in the cluster.
sudo kubeadm init --pod-network-cidr="10.244.0.0/16" --control-plane-endpoint="<MASTER_SERVER_IP_ADDRESS>" --upload-certs --kubernetes-version=v1.24.10
Creating Flannel
kubectl apply -f kube-flannel.yml
Installing Apinizer Images
sudo tar xvf 2024.01.0-apinizer-image.tar
cd 2024.01.0
sudo ctr --namespace k8s.io images import manager-2024.01.0.tar apinizercloud/manager:2024.01.0
sudo ctr --namespace k8s.io images import worker-2024.01.0.tar apinizercloud/worker:2024.01.0
sudo ctr --namespace k8s.io images import cache-2024.01.0.tar apinizercloud/cache:2024.01.0
sudo ctr --namespace k8s.io images import integration-2024.01.0.tar apinizercloud/integration:2024.01.0
sudo ctr --namespace k8s.io images import portal-2024.01.0.tar apinizercloud/portal:2024.01.0
cd ..
Installing MongoDB
sudo yum install -y --cacheonly --disablerepo=* mongo_rpms/*.rpm
Note: After the installation, the MongoDB configurations are the same as those in the document Installation of MongoDB on Red Hat OS.
Important: Perform the Apinizer installation through the Apinizer Installation and Configuration page.
Elasticsearch Installation
Important: After moving the installation file to the /opt/elasticsearch/ directory, follow all the steps in the Installation of Elasticsearch on Red Hat OS page.
sudo mkdir /opt/elasticsearch
cd elasticsearch
# Folder in the offline installation file
sudo mv elasticsearch-7.9.2-linux-x86_64.tar.gz /opt/elasticsearch/
cd /opt/elasticsearch
sudo tar -xzf elasticsearch-7.9.2-linux-x86_64.tar.gz
#After that, go to the elastic document but do not follow the first four steps in 2.2.