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

Unable to create kops cluster on GCE without an ssh key #4210

Closed
roberthbailey opened this issue Jan 7, 2018 · 4 comments
Closed

Unable to create kops cluster on GCE without an ssh key #4210

roberthbailey opened this issue Jan 7, 2018 · 4 comments
Labels

Comments

@roberthbailey
Copy link
Contributor

Thanks for submitting an issue! Please fill in as much of the template below as
you can.

------------- BUG REPORT TEMPLATE --------------------

  1. What kops version are you running? The command kops version, will display
    this information.

$ kops version
Version 1.8.0

  1. What Kubernetes version are you running? kubectl version will print the
    version if a cluster is running or provide the Kubernetes version specified as
    a kops flag.

Didn't get that far.

  1. What cloud provider are you using?

GCE.

  1. What commands did you run? What is the simplest way to reproduce this issue?

Following https://github.com/kubernetes/kops/blob/master/docs/tutorial/gce.md I hit a roadblock at the first step:

$ kops create cluster simple.k8s.local --zones us-central1-a --state gs://robertbailey-kops/ --project=${PROJECT}
I0106 21:29:26.359987    8800 create_cluster.go:439] Inferred --cloud=gce from zone "us-central1-a"

error reading SSH key file "/Users/robertbailey/.ssh/id_rsa.pub": open /Users/robertbailey/.ssh/id_rsa.pub: no such file or directory

Note that I can ssh into existing GCE VMs without any issues, and have had no need to create an ssh key to interact with GCE in the past.

  1. What happened after the commands executed?

kops exited.

  1. What did you expect to happen?

kops create a cluster.

  1. Please provide your cluster manifest. Execute
    kops get --name my.example.com -oyaml to display your cluster manifest.
    You may want to remove your cluster name and other sensitive information.
$ kops get --name my.example.com -oyaml --state gs://robertbailey-kops/

No cluster found
  1. Please run the commands with most verbose logging by adding the -v 10 flag.
    Paste the logs into this report, or in a gist and provide the gist link here.
$ kops create cluster simple.k8s.local --zones us-central1-a --state gs://robertbailey-kops/ --project=${PROJECT} -v 10
I0106 21:33:04.467900    9392 gsfs.go:205] Reading file "gs://robertbailey-kops/simple.k8s.local/config"
I0106 21:33:05.457200    9392 channel.go:93] resolving "stable" against default channel location "https://raw.githubusercontent.com/kubernetes/kops/master/channels/"
I0106 21:33:05.457233    9392 channel.go:98] Loading channel from "https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable"
I0106 21:33:05.457248    9392 context.go:140] Performing HTTP request: GET https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable
I0106 21:33:05.753867    9392 channel.go:107] Channel contents: spec:
  images:
    # We put the "legacy" version first, for kops versions that don't support versions ( < 1.5.0 )
    - name: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2017-07-28
      providerID: aws
      kubernetesVersion: ">=1.4.0 <1.5.0"
    - name: kope.io/k8s-1.5-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.5.0 <1.6.0"
    - name: kope.io/k8s-1.6-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.6.0 <1.7.0"
    - name: kope.io/k8s-1.7-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.7.0 <1.8.0"
    - name: kope.io/k8s-1.8-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.8.0 <1.9.0"
    # Moving to stretch in 1.9 (if goes well)
    # BUT... this is causing the submit queue to block, so back to jessie temporarily: https://github.com/kubernetes/kubernetes/issues/56763
    - name: kope.io/k8s-1.8-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.9.0 <1.10.0"
    # Need stretch as default in 1.10 (for nvme)
    # BUT... this is causing the submit queue to block, so back to jessie temporarily: https://github.com/kubernetes/kubernetes/issues/56763
    - name: kope.io/k8s-1.8-debian-jessie-amd64-hvm-ebs-2017-12-02
      providerID: aws
      kubernetesVersion: ">=1.10.0"
    - providerID: gce
      name: "cos-cloud/cos-stable-60-9592-90-0"
  cluster:
    kubernetesVersion: v1.5.8
    networking:
      kubenet: {}
  kubernetesVersions:
  - range: ">=1.8.0"
    recommendedVersion: 1.8.4
    requiredVersion: 1.8.0
  - range: ">=1.7.0"
    recommendedVersion: 1.7.11
    requiredVersion: 1.7.0
  - range: ">=1.6.0"
    recommendedVersion: 1.6.13
    requiredVersion: 1.6.0
  - range: ">=1.5.0"
    recommendedVersion: 1.5.8
    requiredVersion: 1.5.1
  - range: "<1.5.0"
    recommendedVersion: 1.4.12
    requiredVersion: 1.4.2
  kopsVersions:
  - range: ">=1.8.0-alpha.1"
    recommendedVersion: 1.8.0
    #requiredVersion: 1.8.0
    kubernetesVersion: 1.8.4
  - range: ">=1.7.0-alpha.1"
    recommendedVersion: 1.7.1
    #requiredVersion: 1.7.0
    kubernetesVersion: 1.7.11
  - range: ">=1.6.0-alpha.1"
    #recommendedVersion: 1.6.0
    #requiredVersion: 1.6.0
    kubernetesVersion: 1.6.13
  - range: ">=1.5.0-alpha1"
    recommendedVersion: 1.5.1
    #requiredVersion: 1.5.1
    kubernetesVersion: 1.5.8
  - range: "<1.5.0"
    recommendedVersion: 1.4.4
    #requiredVersion: 1.4.4
    kubernetesVersion: 1.4.12
I0106 21:33:05.754205    9392 create_cluster.go:415] networking mode=kubenet => {"kubenet":{}}
I0106 21:33:05.754245    9392 create_cluster.go:439] Inferred --cloud=gce from zone "us-central1-a"

error reading SSH key file "/Users/robertbailey/.ssh/id_rsa.pub": open /Users/robertbailey/.ssh/id_rsa.pub: no such file or directory
  1. Anything else do we need to know?

First time trying to run kops on GCE.

@chrislovecnm
Copy link
Contributor

@roberthbailey we should integrate into the gce security for ssh, and not worry about a key. Not certain if @justinsb has done that already. Here is a guide for ssh key creation https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2. Also, we need to add that documentation to both AWS and GCE guides.

@roberthbailey
Copy link
Contributor Author

Under https://github.com/kubernetes/kops/blob/master/docs/tutorial/gce.md#creating-a-cluster it says

(If you haven't created an SSH key, you'll have to ssh-keygen -t rsa)

which I suppose covers it, but if you don't have a key you don't get nearly that far through the document before needing to know that tidbit.

justinsb added a commit to justinsb/kops that referenced this issue Jan 24, 2018
We also pull a bit of logic out of the mega-function.

Fix kubernetes#4210
@justinsb
Copy link
Member

Thanks @roberthbailey - will be fixed by #4334

(And #4332 spares you from having to specify --project as well, if you have it configured in gcloud)

justinsb added a commit to justinsb/kops that referenced this issue Jan 24, 2018
We also pull a bit of logic out of the mega-function.

Fix kubernetes#4210
@roberthbailey
Copy link
Contributor Author

Thanks!

iMartyn pushed a commit to iMartyn/kops that referenced this issue Jan 28, 2018
We also pull a bit of logic out of the mega-function.

Fix kubernetes#4210
justinsb added a commit to justinsb/kops that referenced this issue Feb 1, 2018
We also pull a bit of logic out of the mega-function.

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

No branches or pull requests

3 participants