Question

Private docker registry

Hi there,

I just got access to the new kubernetes cluster feature. I was wondering about how to access a private docker registry?

Thanks, M


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I’ve done this with Gitlab as my Docker registry.

Create a secret of type docker-registry:

kubectl create secret docker-registry gitlab-registry --docker-email="EMAIL" --docker-username="USERNAME" --docker-server="https://registry.gitlab.com/" --docker-password="PASSWORD"

My deployment spec:

spec:
  replicas: 1
  selector:
    matchLabels:
      app: deploymentName
  template:
    metadata:
      labels:
        app: deploymentName
    spec:
      containers:
      - name: deploymentName
        image: registry.gitlab.com/group/repo:0.9.0
        ports:
        - containerPort: 8080
      imagePullSecrets:
      - name: gitlab-registry

Hope that helps!

The announcement blog did write:

We understand having your data close to your cluster is essential, so you’ll have the option to deploy a private container registry to your cluster with no configuration, and store the images on DigitalOcean Spaces.

So I understand that’s not really possible? I can’t find a setting anywhere.

Same for the “ingress controller”, where is it?

Thanks! That worked!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more