Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
    • Security
Google Cloud Platform icon
Labs

Establishing a Private Cluster with a Secure Bastion Host

This lab uses the Kubernetes kops installer, to initialize a private Kubernetes cluster, with a secure bastion host. The student is guided, through the use of an ssh agent, to carry an RSA Identity through to the bastion host; and thus facilitate access to the kubernetes master node, without having to replicate the original rsa key, from the Jump Box used to create the cluster. Lastly, the student is shown that stopping the secure bastion host then prevents any access to the kubernetes nodes, and also any deployments of workloads, or use of the `kubectl` command.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Apr 06, 2025
Duration
2h 0m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create a Cluster, With a Private Topology, and Secure the Bastion Host
    1. The script, k8s-create-ac.sh has been provided for this lab. Review the script with the cat command.
    2. Create the cluster config files by executing the lab-provided script. Review the cluster configuration.
    3. Initialize the cluster.

    Note: This is not the bastion host created as a jump box. This is a new bastion host, created by kops that is inside the vpc, with the master and worker nodes.

  2. Challenge

    Using the RSA Key, SSH to the Bastion Host, and Attempt to Access the Master Node
    1. Use the ssh command provided during the cluster initialization to establish a terminal session on the secure bastion host.
    2. In the AWS Console, take note of the IP addresses provided to the secure bastion host.
    3. From the secure bastion host, attempt to access the Kubernetes Master with ssh.
  3. Challenge

    Using an SSH Agent, Connect to the Secure Bastion Host, and Attempt to Access the Master Node
    1. Using eval, check if an SSH agent is already running.
    2. Add the private RSA key as an identity.
    3. Connect to the secure bastion host, and attempt to connect to the master node using the private IP address.
    4. Verify that you have successfully connected to the master node.
  4. Challenge

    From the Master Node, Interrogate the Configuration, and Run the kube-bench Utility
    1. Review the kube-apiserver.manifest file in the /etc/kubernetes/manifests directory.
    2. Review the kube config file.
    3. Install version 0.3.1 of the kube-bench utility.
    4. Execute a kube-bench run against the master node, and review the results.
  5. Challenge

    Using an SSH Session, From the Secure Bastion Host, Execute kubectl Remotely
    1. Using an ssh session from the bastion host, run the kubectl get nodes command on the master node.
    2. From the bastion host, list all running pods, in all namespaces.
    3. From the bastion host, create a pod using the example pod.yaml file, in the course GitHub repository.
    4. Verify that the pod was created successfully.
  6. Challenge

    From the AWS Console, Stop the Secure Bastion Host
    1. In the AWS Console, navigate to the EC2 Dashboard, and view the running instances.
    2. Select the secure bastion host from the list, and use the Instance State menu to stop the instance.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight