Connecting to the Kubernetes Cluster Through a Bastion Host

Lab Steps

Logging in to the Amazon Web Services Console
Understanding the Kubernetes Cluster Architecture
Connecting to the Kubernetes Cluster Through a Bastion Host
Configuring Kubernetes Authentication
Configuring Kubernetes Authorization
Configuring Kubernetes Network Policies
Using Kubernetes Pod Security Contexts
Working with Kuberenetes Secrets
Validate AWS Lab
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.


In this lab step, you will connect to the bastion host and access a shell using Amazon EC2 Instance Connect with kubectl available.



1. In the AWS Management Console search bar, enter EC2, and click the EC2 result under Services:


2. To see available instances, click Instances in the left-hand menu:

The instances list page will open, and you will see an instance named bastion-host:

If you don't see a running instance then the lab environment is still loading. Wait until the Instance state is Running.


3. Right-click the cloudacademylabs instance, and click Connect:

The Connect to your instance form will load.


4. In the form, ensure the EC2 Instance Connect tab is selected:

You will see the instance's Instance ID and Public IPv4 address displayed.


5. In the User name textbox, enter :


6. To open a browser-based shell, click Connect:

If you see an error it's likely that the environment hasn't finished setting up. Check for Setup completed at the top-left corner of the lab, wait a minute, and try connecting again:

A browser-based shell will open in a new window and you will see a shell similar to:

You can also connect to the instance using your preferred SSH client and the PPK (Windows) or PEM (Mac/Linux) key files in the Credentials section of this lab.