Play with the Sample API Server

Uncover some of the deployment details associated with aggregated apiservers.

Overview

Aggregated API servers are usually built with the generic API server library k8s.io/apiserver. They run as stand-alone processes serving API groups with multiple versions. They could run inside or outside of the cluster. In the former case, they run as Pods, with a service in the front. By declaring an APIService object, we can hook our aggregated apiservers up to the kube-apiserver, which can make them work coherently. In the APIService object, we can correlate a service to indicate the accessible endpoint of our aggregated apiservers. If they are running in the cluster, the service could be a normal ClusterIP service. If running outside of a Kubernetes cluster, the service could also be an ExternalName service.

In this lesson, we’re going to deploy a sample aggregate apiserver and take a closer look at what aggregated apiservers look like. Seeing is believing. Then we’ll know how to implement our own aggregated apiservers.

For the purpose of demonstration, we’ll deploy a sample-apiserver, which is built by the Kubernetes community as a reference implementation of an apiserver for a custom Kubernetes API. We could fork this repository, modify it to add our own custom types, and then periodically rebase upstream changes to pick up improvements and bug fixes. We can also choose to use the scaffold framework to generate a scratch repository for solely our custom APIs.

In the demo, we will present various deployment YAMLs to illustrate the configurations.

Get hands-on with 1200+ tech skills courses.