Welcome!

KF2 Review

Difficulty:intermediate

Estimated Time:20-30 minutes

Welcome to day 3 of Kubernetes Fundamentals! We spent a lot of time yesterday going over the core objects in Kubernetes, and there are a lot of them. Configuring these objects is relatively easy, but can be extremely verbose, and there are a lot of extra pieces of configuration to consider.

Before we dive into new concepts for day 3, let's go over what we did yesterday.

If we were to deploy this in our current environment, what would happen?

Next, we would eventually check this into Git. Who sees a problem with that?

I can probably build this file from scratch and only make a few mistakes, almost all YAML related. Who knows how we can do this more easily?

Okay, let's fix this Manifest so it will run on our system, and then deploy it. Who can walk me through step-by-step how to fix this, deploy it, and then track the events that are associated with each object?

Great, now our application is deployed. Except, our Ops team detected a critical vulnerability in nginx:alpine, we need to downgrade to nginx:1.14. Who can help me do this, then walk me through what happened?

Services

Services enable other Pods to talk to each other and also end-users from the outside world to communicate with our Pods. There are 4 types of Services:

ClusterIP

NodePort

LoadBalancer

ExternalName

Unfortunately, I've forgotten what they mean. Can someone help me out?

Now, let's actually create this service, and access it from the web browser.

Mario Demo

The most powerful thing about Docker and Kubernetes, ignoring all of the built-in orchestration features, is the fact that running someone else's code is extremely simple, which we've seen.

Now, let's create a simple application (Deployment and Service) based on the following data:

image: boxboat/mario-demo

We only need a single replica

The container in our Pod listens on port 8080

Everything else is left to you. For practice, put the Deployment and Service into the same Manifest file (you just need --- and a few newlines to separate them). In addition, you can use --dry-run=true to help create the file.

Help

Katacoda offerings an Interactive Learning Environment for Developers. This course uses a command line and a pre-configured sandboxed environment for you to use. Below are useful commands when working with the environment.

cd <directory>

Change directory

ls

List directory

echo 'contents' > <file>

Write contents to a file

cat <file>

Output contents of file

Vim

In the case of certain exercises you will be required to edit files or text. The best approach is with Vim. Vim has two different modes, one for entering commands (Command Mode) and the other for entering text (Insert Mode). You need to switch between these two modes based on what you want to do. The basic commands are: