Setup Kubernetes Registry Secret

Configure a Kubernetes docker-registry secret for GitLab image pulls.

2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/datasurface/demo1 --skill setup-kubernetes-registry-secret-datasurface
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Setup Kubernetes Registry Secret
Source: https://github.com/datasurface/demo1/tree/main/.claude/skills/setup-k8s-registry-secret
Command: npx skills add https://github.com/datasurface/demo1 --skill setup-kubernetes-registry-secret-datasurface

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes clusters often fail to securely pull private images from private registries like GitLab, causing deployment delays and exposure to misconfigurations. This skill configures the necessary image pull secret so pods can access DataSurface images.

Core Features & Use Cases

  • Create and attach a Docker registry secret for the cluster to authenticate to registry.gitlab.com.
  • Apply namespace-scoped secrets to automatically enable image pulls for all pods using the default service account.
  • Use case: When deploying DataSurface components to a Kubernetes cluster that requires a deploy token for image access and private images.

Quick Start

kubectl create secret docker-registry datasurface-registry
--docker-server=registry.gitlab.com
--docker-username="$GITLAB_CUSTOMER_USER"
--docker-password="$GITLAB_CUSTOMER_TOKEN"
-n $NAMESPACE

Frequently Asked Questions about Setup Kubernetes Registry Secret

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Kubernetes docker-registry secret for pulling private images from GitLab?

To create a Kubernetes docker-registry secret for GitLab, use `kubectl create secret docker-registry` with your registry server, deploy token username, and password. This configures authenticated image pulls for private registry access within your cluster namespace.

Why do my Kubernetes pods fail to pull private images from a GitLab registry?

Kubernetes pods fail to pull private GitLab images when the cluster lacks proper authentication credentials. Configuring an image pull secret with a valid GitLab deploy token allows the default service account to authenticate and securely access private registry images.

Do I need a GitLab deploy token to set up an image pull secret in Kubernetes?

Yes, a GitLab deploy token is required to set up an image pull secret in Kubernetes. You must provide the deploy-token credentials as the docker-username and docker-password arguments to authenticate your cluster for private image pulls.

How do I apply a namespace-scoped image pull secret to the default service account?

You apply a namespace-scoped image pull secret by creating the docker-registry secret within a specific namespace. This automatically enables authenticated image pulls for all pods using the default service account in that namespace.

What is the best way to configure Kubernetes to pull DataSurface images from a private registry?

The best way to configure Kubernetes for pulling DataSurface images is creating a docker-registry secret targeting registry.gitlab.com. This requires kubectl access, a configured namespace, and GitLab deploy-token credentials to enable secure private deployments.