Last active
March 17, 2021 11:32
-
-
Save gowatana/91a91818d61f0c3c735acd7e75e8b7fa to your computer and use it in GitHub Desktop.
Nutanix AHV の Custom Script(Cloud-Init)で kubectl むけ VM を作成する。
This file contains 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
#cloud-config | |
disable_root: true | |
ssh_pwauth: true | |
package_upgrade: false | |
users: | |
- name: nutanix | |
lock-passwd: false | |
passwd: $6$oDzrtJla$rMzS0vuH95Q2PjDgqVOsI30MqAYemPK5Y9uYsSpeQWd99R4hqm/JWoJqH4Y81SlbtTMkglp243leccceKNZ9h. | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
packages: | |
- git | |
- unzip | |
- bash-completion | |
runcmd: | |
- mkdir /home/nutanix/bin | |
- curl -L -o /home/nutanix/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
- chmod +x /home/nutanix/bin/kubectl | |
- echo 'source <(kubectl completion bash)' >> /home/nutanix/.bash_profile | |
- chown -R nutanix:nutanix /home/nutanix/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cloud-init 導入済みの CentOS7 OS ディスク イメージを、CVM の acli コマンドでダウンロード&登録するコマンドライン例。