Skip to content

Instantly share code, notes, and snippets.

@svmihar
Last active January 21, 2022 16:18
Show Gist options
  • Save svmihar/c14b7e3250ff2e9b954aaefc1bbb782e to your computer and use it in GitHub Desktop.
Save svmihar/c14b7e3250ff2e9b954aaefc1bbb782e to your computer and use it in GitHub Desktop.
#! /usr/bin/env python3
# install latest stable v1.23.2
import platform
if platform.system().lower() !='linux':
raise OSError('use wsl')
import os
if __name__ == "__main__":
commands = [
'curl -L "https://dl.k8s.io/release/v1.23.2/bin/linux/amd64/kubectl" --output ~/kubectl',
'chmod +x ~/kubectl',
'mkdir -p ~/.local/bin/',
'mv ~/kubectl ~/.local/bin/kubectl',
'rm -rf ~/kubectl'
]
for c in commands:
os.system(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment