Installation Guide for kubectl, oc, git, helm and ansible on Redhat Linux/Fedora/CentOS
Install kubectl and oc
- Download the latest release:
curl -LO "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz"
- Extract the tar file:
tar -xzvf openshift-client-linux.tar.gz
- Move the binaries to your PATH:
chmod +x oc
chmod +x kubectl
sudo mv oc kubectl /usr/local/bin/
Install helm
- Download the latest release:
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
- Install the dependencies:
sudo yum -y install epel-release
sudo yum -y update
sudo yum -y install git ansible python3-pip java-17-openjdk-headless
pip3.11 install kubernetes requests
- Install kubernetes.core module
ansible-galaxy collection install kubernetes.core
Verify
- Verify the installation:
git --version
- Verify the installation:
oc version
- Verify the installation:
kubectl version
- Verify the installation:
ansible --version
- Verify the installation:
helm --version
- Verify the installation:
keytool