Created
September 4, 2020 15:21
-
-
Save alexellis/04d39e5474650aab217f7f8ed0008e5a to your computer and use it in GitHub Desktop.
k3sup on EC2 with cloud-init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this to your user-data field in the EC2 console | |
It creates a new user i.e. "alex" with the SSH key specified. | |
Then: `k3sup install --ip $IP --user alex` | |
```yaml | |
Content-Type: multipart/mixed; boundary="//" | |
MIME-Version: 1.0 | |
--// | |
Content-Type: text/cloud-config; charset="us-ascii" | |
MIME-Version: 1.0 | |
Content-Transfer-Encoding: 7bit | |
Content-Disposition: attachment; filename="cloud-config.txt" | |
#cloud-config | |
cloud_final_modules: | |
- [users-groups, once] | |
users: | |
- name: alex | |
groups: [ wheel ] | |
sudo: [ "ALL=(ALL) NOPASSWD:ALL" ] | |
shell: /bin/bash | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDi6nJt0/hNiRfxIA5YMtdhsMHGYDqrzSuA9hxhf9gcMP4lHsYtzCse3xMn3hZdtu7TLmcT2HNRvrGhKzlBjcZzyFE3aduFS23jCo6uigOoHK/wqlsWQbUCkcSxtOD9vRkdgX/X50/3V230nvdBbeOi/eKLLeouDvXIFVyW6PPW5qiDm+E0mxnbPdVLbD/TVFV+CHthQD8hgvluQ8AD4T/v0n3UPQH8mf+zCekwCurjMLhKYhuuXEKjl1Se+Yxbz0AjOmIRkgYsTRjp7zXhqdtkw/zWY8GVGDw1nYa9u+2vfYaub1Sv6IFuIeXNtKP5WaXTHf+sr4pwLBrK9dV7Ii65 alex@nuc | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment