Skip to content

Commit

Permalink
Update k8s repository and add kubectl tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Icikowski committed Aug 3, 2022
1 parent 266582f commit d6dd403
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions repositories/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@ name: k8s
description: Kubernetes-related tools
maintainer: Piotr Icikowski
contents:
- name: kubectl
description: The Kubernetes command-line tool which allows you to run commands against Kubernetes clusters
newest_version_check:
- curl -Ls https://dl.k8s.io/release/stable.txt | sed 's/v//'
current_version_check:
- kubectl version -o json --client | jq '.clientVersion.gitVersion' -r | sed 's/v//'
install_scenario:
- wget -q -L O ${TEMP}/kubectl "https://dl.k8s.io/release/v${LATEST_VERSION}/bin/${OS}/${ARCH}/kubectl"
- cp ${TEMP}/kubectl /usr/local/bin/kubectl
- chmod a+x /usr/local/bin/kubectl
- kubectl completion bash >/etc/bash_completion.d/kubectl
- chmod a+x /etc/bash_completion.d/kubectl
update_scenario:
- rm -rf /etc/bash_completion.d/kubectl
- rm -rf /usr/local/bin/kubectl
- wget -q -L O ${TEMP}/kubectl "https://dl.k8s.io/release/v${LATEST_VERSION}/bin/${OS}/${ARCH}/kubectl"
- cp ${TEMP}/kubectl /usr/local/bin/kubectl
- chmod a+x /usr/local/bin/kubectl
- kubectl completion bash >/etc/bash_completion.d/kubectl
- chmod a+x /etc/bash_completion.d/kubectl
uninstall_scenario:
- rm -rf /etc/bash_completion.d/kubectl
- rm -rf /usr/local/bin/kubectl
- name: helm
description: The Kubernetes Package Manager
newest_version_check:
Expand Down

0 comments on commit d6dd403

Please sign in to comment.