kops icon indicating copy to clipboard operation
kops copied to clipboard

SSH keys are not added to nodes in GCE

Open marseel opened this issue 1 year ago • 2 comments

/kind bug

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

1.29.0-alpha.2

2. 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. v1.28.4, but probably doesn't matter

3. What cloud provider are you using? GCE

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

kops create cluster --ssh-public-key id_ed25519.pub ...

9. Anything else do we need to know?

Currently, kops adds SSH keys to GCE metadata here However, key used SecretNameSSHPrimary = "admin" makes GCE VM GuestAgent fail to add these keys:

Creating user admin.
Error creating user: useradd: group admin exists - if you want to add this user to that group, use -g

I rebuilt kops with SecretNameSSHPrimary = "marseel" and after that I was able to ssh to machine with a command:

ssh -o "IdentitiesOnly=yes" -i ./id_ed25519 marseel@IP

Also GuestAgent stopped complaining:

Creating user marseel.
Updating keys for user marseel.

marseel avatar Dec 14 '23 19:12 marseel

/cc @hakman just FYI as this is something I stumbled upon when trying to run sig-scalability scale-test on GCE using kops.

marseel avatar Dec 14 '23 20:12 marseel

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 14 '24 03:03 k8s-triage-robot

I'm still encountering this issue with kops on GCE. Is there a plan to fix it soon? Thank you!

nevdullcode avatar Mar 20 '24 13:03 nevdullcode

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Apr 19 '24 14:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar May 19 '24 14:05 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar May 19 '24 14:05 k8s-ci-robot