NETApp University
Introduction to Kubernetes Administration
Lab Guide
Course ID: STRSW-ILT-NKSADM
Catalog Number: TBD
Attention
The information contained in this course is intended only for training. This course contains information and activities that, while beneficial for the purposes of training in a closed, non-production environment, can result in downtime or other severe consequences in a production environment. This course material is not a technical reference and should not, under any circumstances, be used in production environments. To obtain reference materials, refer to the NetApp product documentation that is located at http://mysupport.netapp.com/.
copyright
© 2020 NetApp, Inc. All rights reserved. Printed in the U.S.A. Specifications subject to change without notice.
No part of this document covered by copyright may be reproduced in any form or by any means—graphic, electronic, or mechanical, including photocopying, recording, taping, or storage in an electronic retrieval system—without prior written permission of NetApp, Inc.
U.S. Government rights
Commercial Computer Software. Government users are subject to the NetApp, Inc. standard license agreement and applicable provisions of the FAR and its supplements.
Trademark information
NETAPP, the NETAPP logo, and the marks listed at http://www.netapp.com/TM are trademarks of NetApp, Inc. Other company and product names may be trademarks of their respective owners.
Table of Contents
INTRODUCTION E0
Module 1 E1
Module 2 E2
Module 3 E3
Module 4 E4
Module 5 E5
Module 6 E6
Module 7 E7
Module 8 E8
Module 9 E9
Module 0: Checking Lab equipment
In your exercises, you might see one or more of the following icons.
In this exercise, you familiarize yourself with your equipment and ensure that the credentials provided by the instructor are operational.
This exercise focuses on enabling you to do the following:
-
Ensure access to your jump host
-
Ensure connectivity to an ONTAP cluster
-
Ensure connectivity to the Element Cluster
-
Test the access to the Linux VMs and verify that all tools are running properly
You can download or clone the Github public repositor containing the necessary YAML files for the labs: https://github.com/netapp-devops/course
Each Lab Kit contains the following Labs:
-
Modules 1 to 8: Using Trident with Kubernetes and ONTAP
-
Module 9: Getting Started with NKS on NetApp HCI
-
Optional: Use Cloud Manager to Move Kubernetes Application Workloads Between Hybrid-Cloud Endpoints
**IMPORTANT: SELECT THE LAB Using Trident with Kubernetes and ONTAP **
In this task, you familiarize yourself with the Lab on Demand kit provided by your instructor. You ensure connectivity to the ONTAP cluster and verify the health of the ONTAP cluster.
Step | Action |
---|---|
Open a browser and visit the following Website: |
|
At the login prompt, enter the credentials provided to you by your instructor: Login ID: bXXXXu[YOUR KIT] Password: ask the instructor |
|
Select the Lab called “Using Trident with Kubernetes and ONTAP” and connect to it. | |
Once you see the Windows Desktop (your jump host), verify that you have a file called “Stateful Cmds.txt” on the Desktop. | |
Make sure your keyboard is set to the correct layout. | |
Open the C:/LOD folder and make sure you see the config folder: |
|
On the menu bar, click the Putty icon and verify that you can see 6 RHEL hosts: |
|
In Putty, double click the “cluster1” session and login to the ONTAP cluster: Username: admin Password: Netapp1! |
|
Enter the command “date” and verify that the time is synchronized. | |
Open a web browser and navigate to cluster1.demo.netapp.com. | |
Login using the credentials in step 1-8 and navigate your cluster: |
The RHEL hosts must have several tools running, including Docker and Kubernetes.
Step | Action |
---|---|
Open the Putty Client and double click on the rhel5 session: |
|
Login using the credentials: Username: root Password: Netapp1! |
|
Run the following command to verify that the docker daemon is running: ps -aef | grep dockerd |
|
Verify if containers are running: docker ps |
|
Verify the connection to the public Docker repositories: docker search netapp |
|
Run a Docker container and destroy it: docker run -it debian ls -al exit docker ps docker ps -a (to list stopped containers) docker rm $(docker ps -a -q) (to delete ALL stopped containers) |
|
Verify that the docker0 interface is configured on the host: ifconfig docker0 |
|
Optionally, create an alias for the docker command (makes recurrent commands faster): alias d=’docker’ |
|
Close the putty session and open a new one on rhel3 (master node of the Kubernetes cluster): |
|
Login using the credentials: Username: root Password: Netapp1! |
|
Verify that the Kubernetes services are running: ps -aux | grep kubernetes |
|
Optionally, create an alias for the most utilized Kubernetes command: alias k=’kubectl’ Note: If you use the alias, you can replace all the upcoming “kubectl” commands with “k”. |
|
Verify the version of Kubernetes: k version |
|
Verify the node type you connected to: k cluster-info |
|
Verify that the Kubernetes cluster is showing you the 3 nodes: k get nodes Use the -o option to change the output (this option can be used in many commands): k get nodes -o wide k get nodes -o json |
|
Label the worker nodes (with the role set to “none”) with a recognizable tag: k label node rhel1 node-role.kubernetes.io/worker= k label node rhel2 node-role.kubernetes.io/worker= |
|
Verify that the Kubernetes nodes are showing the right labels: k get nodes |
|
Open the Kubernetes Configuration Files: cat $HOME/.kube/config |
|
View the Kubernetes Configuration: k config view |
|
Navigate to the root user’s directory: cd /root |
|
Clone the contents of the NetAppU DevOps git repository and browse the new folder: git clone https://github.com/netapp-devops/course/ cd course/ ls -al |
End of Exercise