kubens

build-test release Ansible Role Maintainability Rating Reliability Rating Security Rating GitHub tag (latest SemVer) GitHub repo size

Ansible Role: kubens

Role to install (by default) kubens on Debian/Ubuntu and EL systems. kubens is a tool to switch between Kubernetes namespaces easily.

Requirements

None.

Role Variables

Available variables are listed below (located in defaults/main.yml):

Variables list:

kubens_app: kubens
kubens_version: 0.9.5
kubens_os: "{{ ansible_system | lower }}"
kubens_architecture_map:
  amd64: x86_64
  arm: arm64
  x86_64: x86_64
  armv6l: armv6
  armv7l: armv7
  aarch64: arm64
  32-bit: "386"
  64-bit: x86_64
kubens_dl_url: https://github.com/ahmetb/kubectx/releases/download/v{{ kubens_version }}/{{ kubens_app }}_v{{ kubens_version }}_{{ kubens_os }}_{{ kubens_architecture_map[ansible_architecture] }}.tar.gz
kubens_bin_path: /usr/local/bin
kubens_file_owner: root
kubens_file_group: root
kubens_file_mode: '0755'

Variables table:

Variable Description
kubens_app Defines the app to install i.e. kubens
kubens_version Defined to dynamically fetch the desired version to install. Defaults to: 0.9.5
kubens_osarch Used to specify OS type.
kubens_architecture_map Used to specify OS architecture type.
kubens_dl_url Defines URL to download the kubens binary from.
kubens_bin_path Defined to dynamically set the appropriate path to store kubens binary into. Defaults to (as generally available on any user's PATH): /usr/local/bin
kubens_file_owner Owner for the binary file of kubens.
kubens_file_group Group for the binary file of kubens.
kubens_file_mode Mode for the binary file of kubens.

Dependencies

None

Example Playbook

For default behaviour of role (i.e. installation of kubens) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.kubens

For customizing behavior of role (i.e. specifying the desired kubens version) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.kubens
  vars:
    kubens_version: 0.9.3

For customizing behavior of role (i.e. placing binary of kubens package in different location) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.kubens
  vars:
    kubens_bin_path: /bin/

License

MIT

Author Information

This role was created by Ali Muhammad.

About

Installs/Uninstalls 'kubens', tool to switch between Kubernetes namespaces easily.

Install
ansible-galaxy install darkwizard242/ansible-role-kubens
GitHub repository
License
mit
Downloads
1967
Owner
Senior DevOps/CloudOps Engineer. Dedicated to Automating everything I come across. Love to work on and learn new technologies/tools everyday!