Workshop
Connect to the OpenShift Cluster
Connect to your EC2 Instance #
We’ve prepared an Ubuntu Linux instance in AWS/EC2 for each attendee. To connect to your EC2 instance:
- Copy the
Web SSHURL from your instance information in Splunk Show. - Paste the URL in your browser.
- When prompted, input
splunkas the user name. - For the password, copy the
SSH Passwordvalue from Splunk Show.
Set the Workshop Participant Number #
The instructor will provide each participant with a number from 1 to 30. Store this in an environment variable, and remember what it is, as it will be used throughout the workshop:
export PARTICIPANT_NUMBER=<your participant number>Install the OpenShift CLI #
To access the OpenShift cluster, we’ll need to install the OpenShift CLI.
We can use the following command to download the OpenShift CLI binary directly to our EC2 instance:
curl -L -O https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gzExtract the contents:
tar -xvzf openshift-client-linux.tar.gzMove the resulting files (oc and kubectl) to a location that’s included as part of your path. For example:
sudo mv oc /usr/local/bin/oc
sudo mv kubectl /usr/local/bin/kubectlConnect to the OpenShift Cluster #
Ensure the Kube config file is modifiable by the splunk user:
chmod 600 /home/splunk/.kube/configUse the cluster API URL and password provided by the workshop organizer to log in to the OpenShift cluster:
oc login https://api.<cluster-domain>:443 -u participant$PARTICIPANT_NUMBER -p '<password>'Ensure you’re connected to the OpenShift cluster:
oc whoami --show-serverhttps://api.***.openshiftapps.com:443
