Mastering Kubectl with Kubernetes and Kubectl Excellence

The aim of this course was to cover all methods of the kubectl. It was important to the author to cover not only the given examples in the help but also to go that bit further and use some of the lesser known arguments. With the hope that efficiencies will emerge that will offer real savings within our everyday work, including.

  • Speed up diagnosis
  • Speed up our development cycles
  • Make our apps scalable
  • Make our apps more secure

Kubectl Reference

The course is deliberately not written in a prescribed manor, so that you can pick up a lecture that relates to what you are working on or that interests you at any given point. Both Udemy and TutorialsPoint offer courses purchased by them for the life, so you can ingest this course at your own leisure and discover new lectures when you are ready to tackle a given problem.

Although the aim of this course is not directly associated with the kubernetes CKAD course you will find lots of time saving methods that are supper handy for the exam such as:

  • Generating manifests using create and run
  • Adding labels and selectors
  • Setting resource allocation for pods
  • Setting up handy kubectl aliases
  • Replacing objects in one command
  • Using rollback to revert changes
  • and much much more

KUBECTL and CKAD Exam

To find out more about the CKAD course I have written a handy guide to my experience called “9 Top Tips for CKAD Exam Excellence“. Here you will find lots of little tips and tricks that I used to pass the exam. This exam is around two hours long and trust me when I say, this is not a lot of time.

The course also touches on many off the issues raised in this exam.

The Author of kubectl in Kubernetes

The author is non other than our very one Jamie Macdonald. Jamie is a Certified Kubernetes Application Developer with many years of knowledge of creating kubernetes based SaaS applications and configuration by code.

Jamie noticed that there where no video content courses to cover the lesser known methods inside of the command line interface for the kubernetes kubectl. He wanted to expand his knowledge of the lesser known areas and started to explore these using the `kubectl -help` command. He then noticed that you needed to do a lot of set up to explore a lot of this functionality.

It was this process that led him to believe that others could benefit form this research and he templated of each topic and used as many of the arguments as he could fit into each lesson.

Each is command is templated

Each command inside of the kubectl that is in this course has a corresponding readme file that has all of the set up commands leading up to the main topic for that lecture

Here is an example of tutorial supporting information looks like, as you can see below, we have many items that need set up before we start using the expose command and then we have main content of the lecture, in this case `kubectl expose`command.

What Platform

This course was written by the team at test logic but is published on the Udemy platform and the TutorialsPoint. I would check out either platform, you may get yourself a bargain.

There will be a small sample of free lectures to get your hands on and practice ahead of your purchase.

Current methods covered in this course

Basic Commands (Beginner):

  • create     Create a resource from a file or from stdin (going into individual create methods)
  • expose   Take a replication controller, service, deployment or pod and expose it as a new Kubernetes service
  • run         Run a particular image on the cluster
  • set          Set specific features on objects (going into individual set methods)

Basic Commands (Intermediate):

  • explain       Get documentation for a resource
  • get             Display one or many resources
  • edit            Edit a resource on the server
  • delete        Delete resources by file names, stdin, resources and names, or by resources and label selector

Deploy Commands:

  • rollout         Manage the rollout of a resource (going into the individual rollout methods)
  • scale           Set a new size for a deployment, replica set, or replication controller
  • autoscale    Auto-scale a deployment, replica set, stateful set, or replication controller

Cluster Management Commands:

  • certificate     Modify certificate resources
  • cluster-info   Display cluster information
  • top             Display resource (CPU/memory) usage
  • cordon          Mark node as unschedulable
  • uncordon      Mark node as schedulable
  • drain           Drain node in preparation for maintenance
  • taint           Update the taints on one or more nodes

Troubleshooting and Debugging Commands:

  • describe        Show details of a specific resource or group of resources
  • logs            Print the logs for a container in a pod
  • attach          Attach to a running container
  • exec            Execute a command in a container
  • port-forward   Forward one or more local ports to a pod
  • cp              Copy files and directories to and from containers
  • auth            Inspect authorization (going into the individual auth methods)
  • debug           Create debugging sessions for troubleshooting workloads and nodes
  • events          List events, including filtering

Advanced Commands:

  • diff            Diff the live version against a would-be applied version
  • apply         Apply a configuration to a resource by file name or stdin
  • patch         Update fields of a resource
  • replace      Replace a resource by file name or stdin

Settings Commands:

  • label           Update the labels on a resource
  • annotate       Update the annotations on a resource
  • completion   Output shell completion code for the specified shell (bash, zsh, fish, or powershell)

Other Commands:

  • api-resources   Print the supported API resources on the server
  • api-versions    Print the supported API versions on the server, in the form of “group/version”
  • config          Modify kubeconfig files
  • plugin          Provides utilities for interacting with plugins
  • version         Print the client and server version information