Skip to content

Setup of Kubernetes without rancher

Aishwarya Vijay Sinhasane edited this page May 3, 2022 · 2 revisions

Steps

  1. Generate SSH Key:

Below command is used to create an SSH key. This will return a private and a public key which we will be using for connecting SSH to instances we will create.

   sudo su
   ssh-keygen
  1. Download openrc.sh file

To use jetstream2 we need to download openrc.sh file. Unlike jetstream1 we cannot use openrc generator. Please follow below link to get openrc.sh file.

   https://docs.jetstream-cloud.org/ui/cli/openrc/

Then run the below command. This will save environment variables to localhost which we further need to connect to the OpenStack python client.

   source <openrc.sh>

To check we copied correct file run below command

   pip3 install python-openstackclient
   openstack flavor list
  1. To create Public IP run below command. If you already have Public IP you can skip this step.

You can also create public IP using exosphere or running below command

   openstack floating ip create public
  1. To create an instance you need to create an instance-creation.sh file. Refer sample file. Copy contents of this file to your VM.

To setup cluster

    export IP=<IP-Address>
    export CLUSTER=<Any-name>
    bash instance-creation.sh

Here, add public IP which we have created in step 3.

  1. Test Cluster

    sudo su
    kubectl get pods -A
    

Output - you can see pods in running state.