lke-ssh-key

command module
v0.0.0-...-ea43bd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 4 Imported by: 0

README

lke-ssh-key

A small utility for Linode Kubernetes Engine beta testers. It grabs all SSH keys from Linode account and add them to authorized_keys of the Linode instances created by Linode Kubernetes Engine.

Why

Typically we don't need to manually log into LKE-managed Linodes, kubectl can apply all our deployments. However some use cases do requires manual changes in the host nodes, such as using a NFS volume.

We want to automate this process with provisioning tools like Ansible or Terraform, so instead of manually reset root password of each nodes and then set up services, it's better to import SSH keys into all these nodes. As of Jan 2020, LKE-managed Linodes can't directly import SSH keys of Linode account (like newly created Linodes) yet, so I created this utility.

Steps

  1. Add your SSH public keys to Linode profile.

  2. Get a Linode Personal Access Token.

  3. Download the binary:

go get github.com/mudkipme/lke-ssh-key
  1. Run the binary:
LINODE_TOKEN=<your-linode-personal-access-token> lke-ssh-key

Warning

This program will restart all your LKE-managed Linodes and reset the root password and authorized keys. As linodego doesn't support LKE APIs yet, this program selects LKE-managed Linodes by matching labels with "lke" prefix and image names containing "kube". This might result in unexpected behaviors.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL