Skip to content

Installation Guide for kubectl, oc, git, helm and ansible on Redhat Linux/Fedora/CentOS

Install kubectl and oc

  1. Download the latest release:
curl -LO "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz"
  1. Extract the tar file:
tar -xzvf openshift-client-linux.tar.gz
  1. Move the binaries to your PATH:
chmod +x oc 
chmod +x kubectl

sudo mv oc kubectl /usr/local/bin/

Install helm

  1. 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 git, ansible, , python3-pip, java (keytool)

  1. Install the dependencies:
sudo dnf install -y ansible-core python3.12 python3.12-pip java-1.8.0-openjdk.x86_64
  1. Change default python in
sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
sudo alternatives --set python3 /usr/bin/python3.12
  1. Install Python Libraries
pip3 install kubernetes requests
  1. Install kubernetes.core module
ansible-galaxy collection install kubernetes.core

Verify

  1. Verify the installation:
git --version
  1. Verify the installation:
oc version
  1. Verify the installation:
kubectl version
  1. Verify the installation:
ansible --version
  1. Verify the installation:
helm --version
  1. Verify the installation:
keytool