minikube: Minikube connection to internal registry is refused

When I try to push images to internal registry from container (build via Tekton piplines) I get a connection refused error. This is working well with minikube v1.1.1.

The exact command to reproduce the issue: Following https://github.com/kameshsampath/minikube-helpers/tree/master/registry/README.adoc.

The full output of the command that failed: [build-greeter-jvm : buildah-build-push] Head http://dev.local/v2/rhdevelopers/pipeline-greeter/blobs/sha256:9ce2ac72ea3a3f426d08fe7ed892b6983f6ded93b9f82d8f87b8083760f26bec: dial tcp 10.111.212.82:80: connect: connection refused

The output of the minikube logs command:

When I inspected registry logs I got this

registry-p8bmz registry 10.1.0.20 - - [25/Jun/2019:08:54:32 +0000] "HEAD /v2/rhdevelopers/pipeline-greeter/blobs/sha256:49d9522d5abfe1bf7e9646b02e1125fec6376add018a3a1a9a5ab875a3e52b68 HTTP/1.1" 404 157 "" "Buildah/1.7"

The operating system version:

  • minikube version: v1.2.0
  • macOS Mojave 10.14.5
  • vm-driver: hyperkit or virtualbox

Related: https://github.com/kubernetes/minikube/issues/4553

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 36 (34 by maintainers)

Commits related to this issue

Most upvoted comments

Not sure about those repos, but I can successfully make requests to the internal registry now via say: curl http://registry.kube-system.

Try setting your Tekton PipelineResource as follows:

apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: helloworld-image
spec:
  type: image
  params: 
  - name: url
    value: "registry.kube-system:80/tutorial/helloworld"

@medyagh - i see that my helper consistently working with 1.4.0 with both hyperkit and virtualbox.

This is what my helper does

  1. Define a list of dns names (via configmap) that you wish to you use for internal registry e.g. dev.local, example.com
  2. Run a daemonset to add dns names to /etc/hosts of the node matching the CLUSTER-IP of registry in kube-system that was enabled via addons
  3. Finally patch the coredns to resolve the dns names to registry.kube-system.cluster.local address

After these 3 you can now push and pull to the internal registry using the custom domain names.

is there any way we could integrate into minikube?

I was thinking to make this an addon, so we can easily enable/disable this ?