{"id":16777321,"url":"https://github.com/githubixx/ansible-role-kubectl","last_synced_at":"2025-04-10T20:34:37.943Z","repository":{"id":25255766,"uuid":"103570054","full_name":"githubixx/ansible-role-kubectl","owner":"githubixx","description":"Installs kubectl command line utility used to interact with the Kubernetes API Server","archived":false,"fork":false,"pushed_at":"2025-01-21T21:30:09.000Z","size":82,"stargazers_count":19,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T18:11:38.491Z","etag":null,"topics":["ansible","ansible-role","kubectl","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubixx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-14T18:55:51.000Z","updated_at":"2025-01-21T21:29:50.000Z","dependencies_parsed_at":"2023-01-14T02:30:11.948Z","dependency_job_id":"a14820aa-c459-4e5b-b4f6-b01735c92e59","html_url":"https://github.com/githubixx/ansible-role-kubectl","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-kubectl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-kubectl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-kubectl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-kubectl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubixx","download_url":"https://codeload.github.com/githubixx/ansible-role-kubectl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290070,"owners_count":21078923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","kubectl","kubernetes"],"created_at":"2024-10-13T07:24:23.075Z","updated_at":"2025-04-10T20:34:37.920Z","avatar_url":"https://github.com/githubixx.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-role-kubectl\n\nInstalls `kubectl` command line utility used to interact with the Kubernetes API Server.\n\n## Versions\n\nI tag every release and try to stay with [semantic versioning](http://semver.org). If you want to use the role I recommend to checkout the latest tag. The master branch is basically development while the tags mark stable releases. But in general I try to keep master in good shape too. A tag `23.3.0+1.31.5` means this is release `23.3.0` of this role and `kubectl` client binary version is `1.31.5`. If the role itself changes `X.Y.Z` before `+` will increase. If the Kubernetes version changes `X.Y.Z` after `+` will increase. This allows to tag bugfixes and new major versions of the role while it's still developed for a specific Kubernetes release.\n\n## Changelog\n\n**Change history:**\n\nSee full [CHANGELOG](https://github.com/githubixx/ansible-role-kubectl/blob/master/CHANGELOG.md)\n\n**Recent changes:**\n\n## 23.3.0+1.31.5\n\n- update kubectl to `v1.31.5`\n\n## 23.2.0+1.30.5\n\n- update kubectl to `v1.30.5`\n- Download URL of `kubectl` archive has changed. `https://storage.googleapis.com` doesn't work anymore. Using `https://dl.k8s.io` instead now (see [Client Binaries](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.30.md#client-binaries)).\n- update `.yamllint`\n- update `meta/main.yml`\n- Molecule: update tests\n- Molecule: fix various `ansible-lint` issues\n\n## Installation\n\n- Directly download from Github (Change into Ansible roles directory before cloning. You can figure out the role path by using `ansible-config dump | grep DEFAULT_ROLES_PATH` command):\n`git clone https://github.com/githubixx/ansible-role-kubectl.git githubixx.kubectl`\n\n- Via `ansible-galaxy` command and download directly from Ansible Galaxy:\n`ansible-galaxy install role githubixx.kubectl`\n\n- Create a `requirements.yml` file with the following content (this will download the role from Github) and install with\n`ansible-galaxy role install -r requirements.yml` (change `version` if needed):\n\n```yaml\n---\nroles:\n  - name: githubixx.kubectl\n    src: https://github.com/githubixx/ansible-role-kubectl.git\n    version: 23.3.0+1.31.5\n```\n\n## Role Variables\n\n```yaml\n# \"kubectl\" version to install\nkubectl_version: \"1.31.5\"\n\n# The default \"binary\" will download \"kubectl\" as a binary file. This is\n# about 2.5x bigger then the \".tar.gz\" file. The tarball needs to be unarchived\n# by the role first after downloading and is smaller.\n#\n# If you specify \"binary\" the \"kubectl\" binary file will be downloaded. In\n# contrast to the tarball the binary file is about 2.5x bigger but doesn't\n# need to be unarchived by this role.\n#\n# If download file size is important for you (e.g. slow download or download\n# over mobile link) stay with \"archive\". Otherwise \"binary\" might be an option.\nkubectl_download_filetype: \"binary\"\n\n#\n# SHA512 checksum of the \"kubernetes-client-linux-amd64.tar.gz\" file\n# (see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md#client-binaries)\nkubectl_checksum_archive: \"sha512:de866a5841bff9b9e6666e0065c2bfd0a8420d8fa2cb3b62ea6191105a2d8661dc44250c0d5e5ad4ed1a34348c75b25e55f25d78dc15cc4d3681946f71d59121\"\n\n#\n# SHA512 checksum of the binary. There is normally no need to change it.\n# Further information:\n#   - https://kubernetes.io/releases/download/#binaries\n#   - https://www.downloadkubernetes.com/\nkubectl_checksum_binary: \"sha512:https://cdn.dl.k8s.io/release/v{{ kubectl_version }}/bin/{{ kubectl_os }}/{{ kubectl_arch }}/kubectl.sha512\"\n\n# Where to install \"kubectl\" binary\nkubectl_bin_directory: \"/usr/local/bin\"\n\n# Directory to store the kubectl archive\nkubectl_tmp_directory: \"{{ lookup('env', 'TMPDIR') | default('/tmp', true) }}\"\n\n# Owner of \"kubectl\" binary\nkubectl_owner: \"root\"\n\n# Group of \"kubectl\" binary\nkubectl_group: \"root\"\n\n# Specifies the permissions of the \"kubectl\" binary\nkubectl_binary_mode: \"0755\"\n\n# Operating system on which \"kubectl\" should run on\nkubectl_os: \"linux\"  # use \"darwin\" for MacOS X, \"windows\" for Windows\n\n# Processor architecture \"kubectl\" should run on\nkubectl_arch: \"amd64\"  # other possible values: \"386\",\"arm64\",\"arm\",\"ppc64le\",\"s390x\"\n```\n\n## Testing\n\nThis role has a small test setup that is created using [molecule](https://github.com/ansible-community/molecule). To run the tests follow the molecule [install guide](https://molecule.readthedocs.io/en/latest/installation.html). Also ensure that a Docker daemon runs on your machine.\n\nAssuming [Docker](https://www.docker.io) is already installed you need at least two Python packages:\n\n```bash\npip3 install --user molecule\npip3 install --user molecule-docker\n```\n\nAfterwards molecule can be executed:\n\n```bash\nmolecule converge\n```\n\nThis will setup a few Docker container with Ubuntu 20.04/22.04/24.04 and Debian 11/12 with `kubectl` installed. To verify if everything worked:\n\n```bash\nmolecule verify\n```\n\nTo clean up run\n\n```bash\nmolecule destroy\n```\n\n## Example Playbook\n\n```yaml\n- hosts: your-host\n  roles:\n    - githubixx.kubectl\n```\n\n## License\n\nGNU GENERAL PUBLIC LICENSE Version 3\n\n## Author Information\n\n[TauCeti Blog](http://www.tauceti.blog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-kubectl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubixx%2Fansible-role-kubectl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-kubectl/lists"}