The Kubernetes command-line tool, kubectl, lets you call the underlying Kubernetes Resource Model (KRM) APIs provided by Google Distributed Cloud (GDC) air-gapped. You can deploy Kubernetes custom resource definitions with the kubectl CLI to create and manage GDC service resources.
This document is for all audience groups that work on GDC that must make API calls to manage their air-gapped hardware and software workflows. For more information, see Audiences for GDC air-gapped documentation.
Before you begin
Before you install the kubectl CLI, you must install and configure the gdcloud CLI. For more information, see Use the gdcloud CLI.
Install the kubectl CLI
Complete the following steps to install the kubectl CLI in your GDC environment:
Install the
kubectlcomponent with the gdcloud CLI:gdcloud components install kubectlVerify that the kubectl CLI is installed:
kubectl versionThe output is similar to the following:
Client Version: v1.30.2-gke.1100 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.30.12-gke.300Install the
gdcloud-k8s-auth-plugincomponent with the gdcloud CLI:gdcloud components install gdcloud-k8s-auth-plugin
After the kubectl CLI is installed, you must use the gdcloud CLI to generate the kubeconfig file for the cluster or API server that hosts your resources to give you access to the APIs.