We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Gateway Types

You may have noticed that at the top of all our resources we have this in the YAML:

apiVersion: v1

This is the API version of the resource, and because those resources are core to Kubernetes, they're in the standard v1 API group.

However, Gateway isn't a core Kubernetes resource, it's an extension of sorts. That's why it has:

apiVersion: gateway.networking.k8s.io/v1

You can think of the networking.k8s.io API group as a core extension. It's not third-party (it's on k8s.io for heaven's sake), but it's not part of the core Kubernetes API either.

Annotations

The core Kubernetes API is intentionally kept small, but there are a lot of things that people want to do with Kubernetes that aren't part of the core API. So, instead of adding a bunch of new fields to the core API, Kubernetes allows you to add arbitrary annotations to your resources, and then various extensions can read those annotations and do things with them.

For example, the Boot.dev Kubernetes cluster uses a Gateway extension specific to Google Cloud Platform. We use the following annotation so that our controller knows which SSL certificate to use:

annotations:
  networking.gke.io/certmap: certmap-name-here

If you're curious about the specifics, the docs are here. In a nutshell, however, the important take-away is that in most production deployments you'll be using annotations specific to the cloud provider you're using. Each major cloud provider has their own products, so you need to use k8s annotations and extensions specific to that cloud provider.

Now that you understand the basic concepts of Gateway, in the future, it's just a matter of following the documentation for your cloud provider to get it set up.