- System should have container runtime, here I used containerd
- Did not use docker because of version compatibility issue
- Keep zypper updated and refresh it
-
swapoff -a
-
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
-
tee /etc/modules-load.d/containerd.conf <<EOF overlay br_netfilter EOF
-
modprobe overlay
-
modprobe br_netfilter
-
tee /etc/sysctl.d/kubernetes.conf<<EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 EOF
-
sysctl --system
-
zypper refresh
-
zypper in containerd
-
mkdir -p /etc/containerd containerd config default>/etc/containerd/config.toml sed -e 's/SystemdCgroup = false/SystemdCgroup = true/g' -i /etc/containerd/config.toml
-
systemctl daemon-reload systemctl enable containerd systemctl start containerd systemctl status containerd
zypper install conntrack-tools
zypper install iptables
zypper install docker
vim /etc/sysconfig/proxy
to make sure the following are set
HTTP_PROXY=http://hpeproxy.its.hpecorp.net:80
HTTPS_PROXY=http://hpeproxy.its.hpecorp.net:443
NO_PROXY=10.103.0.0/16,10.96.0.0/16,192.168.0.0/16,localhost,127.0.0.1,us.cray.com,americas.cray.com,dev.cray.com,hpc.amslabs.hpecorp.net,eag.rdlabs.hpecorp.net,github.hpe.com,jira-pro.its.hpecorp.net
- Re-login to shell
vim /usr/lib/systemd/system/containerd.service
to edit and add under[Service]
the following:
Environment="HTTP_PROXY=http://hpeproxy.its.hpecorp.net:80"
Environment="HTTPS_PROXY=http://hpeproxy.its.hpecorp.net:443"
Environment="NO_PROXY=10.103.0.0/16,10.96.0.0/16,192.168.0.0/16,localhost,127.0.0.1,us.cray.com,americas.cray.com,dev.cray.com,hpc.amslabs.hpecorp.net,eag.rdlabs.hpecorp.net,github.hpe.com,jira-pro.its.hpecorp.net"
systemctl daemon-reload
systemctl restart containerd
- Download and install minikube latest version.
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
-
Start minikube with the required version(here v1.23.17)
minikube start --kubernetes-version=v1.23.17 --container-runtime=containerd --driver=none
- In case of errors faced try resolving them from Google
- Using container-runtime as containerd, and driver as none.
- Used driver as none because if I chose docker as driver it give error due to root privellages of docker.
- If setting up gets error due to crictl, resolve using following:
wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.25.0/crictl-v1.25.0-linux-amd64.tar.gz
sudo tar zxvf crictl-v1.25.0-linux-amd64.tar.gz -C /usr/local/bin
- Incase you still find crictl not found then try:
sudo tar zxvf crictl-v1.25.0-linux-amd64.tar.gz -C /usr//bin
- Incase you still find crictl not found then try:
- In case there is error that kubectl not found:
curl -LO https://dl.k8s.io/release/v1.23.17/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- If required do:
systemctl enable kubelet
-
Run
kubectl get node
to check if cluster is set-up. -
Run
kubectl get all
to see what all is running on the cluster. -
Incase of error of bridge fail try this
- To install a CNI plugin tgz in /opt/cni/bin, you can use the following steps:
- Create a directory for the CNI:
mkdir -p /opt/cni/bin
Download the plugin: curl -O -L https://github.com/containernetworking/plugins/releases/download/v0.9.1/cni-plugins-linux-amd64-v0.9.1.tgz
- Extract the CNI binary and move it to the directory:
tar -C /opt/cni/bin -xzf cni-plugins-linux-amd64-v0.9.1.tgz
- For Cri-dockerd: https://www.mirantis.com/blog/how-to-install-cri-dockerd-and-migrate-nodes-from-dockershim
{
"proxies": {
"default": {
"httpProxy": "http://hpeproxy.its.hpecorp.net:80",
"httpsProxy": "http://hpeproxy.its.hpecorp.net:443",
"noProxy": "10.103.0.0/16,10.96.0.0/16,192.168.0.0/16,localhost,127.0.0.1,us.cray.com,americas.cray.com,dev.cray.com,hpc.amslabs.hpecorp.net,eag.rdlabs.hpecorp.net,github.hpe.com,jira-pro.its.hpecorp.net"
}
}
}