These procedures provide the steps required to install the K8's image onto all hosts via the Bastion Host using a occne/k8s_install container. Once completed, configure procedure can be run.
Prerequisites
Limitations and Expectations
Steps to Perform OCCNE Kubernetes Installer
All steps are executable from a SSH application (putty) connected laptop accessible via the Management Interface.
Table 3-14 Procedure to install OCCNE Kubernetes
Step # | Procedure | Description |
---|---|---|
1 ![]() |
Initial Configuration on the Bastion Host to Support the Kubernetes Install |
|
2 ![]() |
Execute the Kubernetes Install on the Hosts from the Bastion Host |
Note: The cluster_name field is derived from the hosts.ini file
field:
The
Create a file named
repo_remove.yaml in
/var/occne/<cluster_name>
directory with following content:
- hosts: k8s-cluster tasks: - name: Clean artifact path file: state: absent path: "/etc/yum.repos.d/docker.repo" Start the k8s_install container with a bash shell :
For example:
Run following commands within the bash of the container:
Run following command:
Example:
|
3 ![]() |
Update the $PATH Environment Variable to access the kubectl command from the kubectl.sh script |
On the Bastion Host, edit the
%% On the bastion Host edit file /root/.bash_profile. # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH %% Update the following to the PATH variable: PATH=$PATH:$HOME/bin:var/occne/<cluster_name>/artifacts %% Save the file and source the .bash_profile file: source /root/.bash_profile %% Execute the following to verify the $PATH has been updated. echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/var/occne/rainbow.lab.us.oracle.com/artifacts
%% Make sure the permissions on the
/var/occne/rainbow.lab.us.oracle.com/artifacts/kubectl.sh
and
/var/occne/rainbow.lab.us.oracle.com/artifacts/kubectl
files are set correctly:
-rwxr-xr-x. 1 root root 248122280 May 30 18:23 kubectl -rwxr-xr-x. 1 root root 112 May 30 18:44 kubectl.sh %% If not run the following command: chmod +x kubectl |
4 ![]() |
Run Kubernetes Cluster Tests |
For verification of k8s installation, run docker command in the k8s_install /test/cluster_test. |