Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-for-mac - cannot parse dnsName "kubernetes.default.svc." on helm init #3873

Closed
esetnik opened this issue Apr 11, 2018 · 20 comments
Closed

Comments

@esetnik
Copy link

esetnik commented Apr 11, 2018

❯ helm init
Creating /Users/x/.helm
Creating /Users/x/.helm/repository
Creating /Users/x/.helm/repository/cache
Creating /Users/x/.helm/repository/local
Creating /Users/x/.helm/plugins
Creating /Users/x/.helm/starters
Creating /Users/x/.helm/cache/archive
Creating /Users/x/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /Users/x/.helm.
Error: error installing: Post https://localhost:6443/apis/extensions/v1beta1/namespaces/kube-system/deployments: tls: failed to parse certificate from server: x509: cannot parse dnsName "kubernetes.default.svc."

Output of helm version:
❯ helm version
Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}

Output of kubectl version:
❯ kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.6", GitCommit:"6260bb08c46c31eea6cb538b34a9ceb3e406689c", GitTreeState:"clean", BuildDate:"2017-12-21T06:34:11Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitCommit:"9f8ebd171479bec0ada837d7ee641dec2f8c6dd1", GitTreeState:"clean", BuildDate:"2018-03-21T15:13:31Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Docker-for-mac Version 18.04.0-ce-rc2-mac61 (23890)

Likely related to:

@bacongobbler
Copy link
Member

bacongobbler commented Apr 11, 2018

We've seen this across the ecosystem. I'd suggest using minikube or downgrading docker for mac for the time being.

@jonaseck2
Copy link

Downgrading to 18.03.0-ce-mac58 resolves the issue:

brew cask uninstall docker-edge
brew cask install https://raw.githubusercontent.com/caskroom/homebrew-versions/36c418b5e6fdcb823b8a06d698bbf6d7d4f38ee0/Casks/docker-edge.rb

@lox
Copy link

lox commented Apr 14, 2018

Is there a https://github.com/docker/for-mac/issues for this?

@outsideris
Copy link

I download 18.03.0-ce-mac58 and reinstall it to downgrade docker for mac.

@koalalorenzo
Copy link

The downgrade works for me as well. Not sure if it is a docker or helm issue. both? 😕

@bacongobbler
Copy link
Member

Docker issue

@edburns
Copy link

edburns commented Apr 17, 2018

I am experiencing this as well.

@esetnik
Copy link
Author

esetnik commented Apr 17, 2018

@koalalorenzo opened docker/for-mac#2811 to track this issue

@edburns
Copy link

edburns commented Apr 17, 2018

I can also confirm that downgrading to 18.03.0-ce-mac58 worked for me.

@technosophos
Copy link
Member

The root cause seems to be a recent change to Go''s SSL library and the way D4M sets the dnsName field in the x509 cert: golang/go#23995

@tedmiston
Copy link

tedmiston commented Apr 30, 2018

This fix doesn't seem to be working for me using the latest Helm (2.9.0).

t-mbp:~ taylor$ helm init --upgrade
$HELM_HOME has been configured at /Users/taylor/.helm.
Error: error installing: Post https://localhost:6443/apis/extensions/v1beta1/namespaces/kube-system/deployments: dial tcp [::1]:6443: connect: connection refused

Edit 1: I'm going to see if downgrading Helm makes a difference.

Edit 2: Downgrading Helm to the prior release (2.8.2) made it work for me:

brew uninstall kubernetes-helm
brew install https://github.com/Homebrew/homebrew-core/blob/993e941f/Formula/kubernetes-helm.rb
$ helm init
$HELM_HOME has been configured at /Users/taylor/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!

@bacongobbler
Copy link
Member

bacongobbler commented May 28, 2018

Yeah, downgrading to Helm 2.8.2 will also work because it's compiled against Go 1.8, bypassing the breaking change Go 1.9 introduced as @technosophos mentioned. :)

@edburns
Copy link

edburns commented Jun 5, 2018

As far as I know, one still needs to use Docker for Mac Edge Version 18.03.0-ce-mac58 (23607) to have this not be a problem.

@tedmiston
Copy link

tedmiston commented Jun 5, 2018

I haven't tried upgrading to latest yet myself since this. Each upgrade so far has broken my Kubernetes setup and required rebuilding the cluster. It can be time-consuming when one has deadlines to hit. I'll give it another go once I have more flexibility there.

@edburns
Copy link

edburns commented Jul 25, 2018

I'd love to get some word that this has been fixed or not. Every time I get pestered by a new Docker for Mac upgrade, from 18.03.0-ce-mac58, I check and every time it's not fixed. Anyone else have any status on this?

@tedmiston
Copy link

I haven't tried them yet, but there were new releases of both stable and edge yesterday.

Stable 18.06.0-ce-mac70 - https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-18060-ce-mac70-2018-07-25

Edge 18.06.0-ce-mac69 - https://docs.docker.com/docker-for-mac/edge-release-notes/#docker-community-edition-18060-ce-mac69-2018-07-25

@clanesf
Copy link

clanesf commented Aug 9, 2018

Getting this same issue on Edge 18.06.0-ce-mac.

@adamalex
Copy link

adamalex commented Aug 9, 2018

For anyone that saw my post from a minute or so, please disregard

@edburns
Copy link

edburns commented Aug 10, 2018

I am happy to report that with Docker for Mac Stable 18.06.0-ce I am able to do helm init successfully. I performed the following steps to get there.

  • Using Docker preferences, factory reset
  • Using Docker preferences, uninstall docker
  • Using appcleaner, delete Docker from applications
  • Empty trash
  • Reboot
  • Download fresh .dmg of Docker for Mac 18.06.0-ce.
  • Doubleclick the installer
  • Install docker
  • Using Docker preferences, select "Kubernetes" instead of "Swarm"
  • Using Docker preferences, enable Kubernetes, waiting for it to successfully start
  • Using homebrew, upgrade kubernetes-helm, waiting for it to install
  • Finally, I can do helm init.

I did not observe the "cannot parse dnsName" error. From my perspective, this issue can be closed.

@bacongobbler
Copy link
Member

Woop! I believe @technosohos also indicated that he was able to get this working today. Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests