Difficulty: Beginner
Estimated Time: 15 minutes

Kubernetes API

Kubernetes

This scenario takes you through the basics of accessing and exploring the Kubernetes API. The API is used to create, read, update, and delete (CRUD) and Kubernetes object or resource.

In this scenario you will learn how to:

  • Access the API via kubectl
  • Introspect objects in the cluster via the API
  • Access the cluster API locally through a Proxy
  • Discover api-resources and api-versions
  • Discover the Explain and Describe commands

Conclusion

The Kubernetes API server is the gateway into Kubernetes and is accessed via HTTP. All administrative interactions with Kubernetes is through this API. External command-line tools, language libraries, and internal controllers and operators all use this same API for all CRUD operations toward Kubernetes.

Lessons Learned

With these steps you have learned:

  • ✔ how to access the API via kubectl,
  • ✔ how to introspect objects in the cluster via the API,
  • ✔ how to access the cluster API locally through a Proxy,
  • ✔ how to reference api-resources and api-versions
  • ✔ how to Explain and Describe resources.

Special Thank You

To Ken Sipe as he inspired this scenario from his labs found here.

References


For a deeper understanding of these topics and more join
Jonathan Johnson
at various conferences, symposiums, workshops, and meetups.

Software Architectures ★ Speaker ★ Workshop Hosting ★ Kubernetes & Java Specialist

Kubernetes API

Step 1 of 6

Your Kubernetes Cluster

For this scenario, Katacoda has just started a fresh Kubernetes cluster for you. Verify it's ready for your use.

kubectl version --short && \ kubectl get componentstatus && \ kubectl get nodes && \ kubectl cluster-info

The Helm package manager used for installing applications on Kubernetes is also available.

helm version --short

Kubernetes Dashboard

You can administer your cluster with the kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.

token.sh

Terminal
Terminal 2
Kubernetes Dashboard

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

This tab will not be visible to users.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]