0% found this document useful (0 votes)
15 views3 pages

Kubernetes

Uploaded by

kibria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Kubernetes

Uploaded by

kibria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Introduction

Kubernetes The Hard Way is a guide for setting up a Kubernetes cluster from scratch.

● Follow the tutorial to install Kubernetes:


https://github.com/KentoKubo/kubernetes-the-hard-way
● Important: Before performing the cleanup in the last section of the tutorial, don't
forget the additional questions in this lab (section 13).

2. Deploying a Cluster: Kubernetes The Hard Way

1. Prerequisites and Client Tools

(a) To install the gcloud CLI: https://cloud.google.com/sdk/docs/install

2. Provisioning Compute Resources

(a) What connections are you authorizing?

(b) How are the instances created for the controllers and the workers different?

(c) List your instances.

3. Provisioning a CA and Generating TLS Certificates

(a) What certificates are you creating, and why?

4. Generating Kubernetes Configuration Files for Authentication

(a) What is the public address of your cluster?

(b) What are kubeconfig files used for?

(c) Provide an example of the kubeconfig file for one of your worker nodes. What do the
different sections represent?

5. Generating the Data Encryption Config and Key

(a) What are Kubernetes Secrets? What are they used for?

6. Bootstrapping the etcd Cluster

(a) What is an etcd cluster? What is its purpose in a Kubernetes cluster?

(b) List the members of your etcd cluster from one of the controllers.

7. Bootstrapping the Kubernetes Control Plane

(a) Check the value of $REGION. If incorrect, use the previously defined region or set it
using:
REGION=$(curl -s -H "Metadata-Flavor: Google"
http://metadata.google.internal/computeMetadata/v1/instance/zone | cut -d/ -f 4 | sed
's/.{2}$//')

(b) What services do you install on the Control Plane? What are their roles?

(c) Why do you need to install nginx?

(d) What permissions are granted to the role "system"?

(e) In the "Provision a Load Balancer" section, what do the different commands do?

8. Bootstrapping Kubernetes Workers

(a) What container runtime is used? Provide an alternative option.

(b) List the workers.

9. Configuring kubectl for Remote Access

(a) List the workers again without using gcloud.

10. Provisioning Pod Network Routes

(a) What are the new routes you are creating used for?

11. Deploying the DNS Cluster Add-on

(a) Replace the URL to install CoreDNS with


https://raw.githubusercontent.com/KentoKubo/kubernetes-the-hard-way/devel/manifests/core
dns-1.10.1.yaml

(b) What is CoreDNS? What is its role in your cluster?

12. Smoke Test

(a) List the results of the various tests.

(b) What is a Kubernetes Service? What is a Service NodePort, and how does it differ from
a LoadBalancer service?

(c) Important: Do not perform the Cleanup section immediately. You will still need to use
your cluster.

13. Additional Tests

For this section, provide the YAML files and the commands you used.

(a) What is a config map?

(b) On your local machine, create the following file and create a ConfigMap that uses it:
$ cat conf.d/nginx-basic.conf
server {
location / {
return 200 'Hello World!';
add_header Content-Type text/plain;
}
}

(c) Create a pod using the image nginx:1.14.2 and using your ConfigMap. How can you
verify that the ConfigMap is added to the Pod?

(d) Now create a deployment with 2 replicas of the pod you defined (delete the pod before
creating the deployment). Describe the deployment and list its pods.

(e) Expose your deployment with a service and check that you can see the content of your
ConfigMap.

(f) Update your deployment to use the image nginx:1.16.1. Describe your changes. (

g) Update your deployment to use the image nginx:1.16.3. What happens? How can you fix
the issue?

(h) Modify your deployment to have 4 pods. Provide two ways to make this change, and list
your pods.

14. Cleaning Up

● Don’t forget to delete the resources you created.

You might also like