Pages

Thursday, August 17, 2017

Kubernetes the Hard Way: Lab 1 Notes

Introduction 

These are my additional notes for following Kelsey Hightower's Kubernetes the Hard Way lab 1. These notes will not make much sense if you aren't following along with the official notes.


Local System Configuration

  • Install the Google Cloud CLI from here.
  • Launch a CLI terminal and login via the following command:
gcloud auth login
  • A browser window will launch and prompt you for your Google Account credentials.  After clicking through the login pane, it should redirect to your terminal.
  • In the browser, navigate to the Google Cloud Platform Dashboard and create a VM.  When I initially installed the Google Cloud SDK, it wouldn't let me create a VM from the CLI until I did this.


Lab Notes

  • Create the Kubernetes the Hard Way network as indicated in the lab guide.  You can validate that the network was created by going to the Google Cloud UI and selecting "VPC Network" -> "VPC Networks", or via the following command:
gcloud compute networks list
  • Create the Kubernetes subnet within the Kubernetes-the-Hard-Way network.  You can validate that it was created by checking the "VPC Networks" pane above, or through the following command:
gcloud compute networks subnets list
  •  Create the firewall rules for the Kubernetes subnet.  Besides the provided CLI to validate their creation, you can also see them by navigating to "VPC Network" -> "Firewall rules."
  • Create your floating public IP address.  You can view it within the "VPC Network" -> External IP addresses" pane.
  • Create the Controller and Worker nodes.  After they're created, you can see their external networking configuration within the "VPC Network" -> "External IP addresses" pane.  Notice that the floating IP address that you created still isn't assigned.


Final Notes

I've created a set of scripts to automate the setup and tear down of this lab.  They are available on GitHub - I wouldn't use them initially, but if you need to spread the labs out over multiple days, they provide an easy way to stand up and tear down the infrastructure.  At the end of this lab, your infrastructure should look similar to this:



No comments:

Post a Comment