Skip to main content
This guide walks you through inspecting a Google Kubernetes Engine (GKE) cluster. You’ll learn how to list nodes, view namespaces, deploy a sample NGINX app with Ingress, verify your kubeconfig, and prepare namespaces for GitLab CI/CD.

Inspecting Cluster Nodes on GKE

Make sure you’ve authenticated with GKE and set up kubectl (or aliased as k) using:
List your cluster’s worker nodes:
Example output:
These nodes are running Kubernetes v1.29.0.

Viewing Namespaces and the NGINX Ingress Controller

Show all namespaces:
Locate the ingress-nginx namespace and inspect its resources:
You should see:
  • A Deployment managing the Ingress Controller pod
  • A LoadBalancer Service exposing a public IP

Deploying a Sample NGINX Application

In the default namespace, the following resources route traffic through the Ingress Controller:
Sample output:
Copy the Ingress host into your browser. You may encounter a security warning due to a self-signed certificate:
The default Ingress TLS certificate is self-signed. Browsers will warn before displaying the NGINX welcome page.
The image shows a browser displaying the default "Welcome to nginx!" page, indicating that the nginx web server is successfully installed and running.
This confirms external traffic is routed correctly.

Configuring kubectl and kubeconfig for CI/CD

To automate deployments in GitLab CI, ensure kubectl is installed and authenticated via kubeconfig. Check client and server versions:
View the active kubeconfig context:
A dedicated user or service account (e.g., gitlab-cluster-admin) should authenticate your GitLab CI jobs.

Creating Namespaces for Environments

Instead of separate clusters, use dedicated namespaces to isolate development and staging workloads:
Verify all namespaces:
Your cluster is now prepared for GitLab CI pipelines targeting development and staging.

Kubernetes CLI Command Reference

Watch Video