Ansible Role Kubernetes

Ansible role for installing Kubernetes
Alternatives To Ansible Role Kubernetes
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Aws Iam Authenticator1,970459 days ago27July 01, 202217apache-2.0Go
A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster
Kube2iam1,884
2 months ago2March 10, 2021105bsd-3-clauseGo
kube2iam provides different AWS IAM roles for pods running on Kubernetes
Rbac Manager1,21612 days ago23July 06, 202216apache-2.0Go
A Kubernetes operator that simplifies the management of Role Bindings and Service Accounts.
Kiam1,131
a month ago1July 07, 2021121apache-2.0Go
Integrate AWS IAM with Kubernetes
Kubiscan1,092
11 days ago4gpl-3.0Python
A tool to scan Kubernetes cluster for risky permissions
Audit2rbac919
a month ago2March 11, 202210otherGo
Autogenerate RBAC policies based on Kubernetes audit logs
Rbac Lookup718
10 days ago30July 06, 20228apache-2.0Go
Easily find roles and cluster roles attached to any user, service account, or group name in your Kubernetes cluster
Rbac Tool574
a month ago37July 19, 20226apache-2.0Go
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Ansible Roles475
5 months ago3mitHTML
Ansible Roles
Ansible Role K3s444
8 days ago4bsd-3-clauseJinja
Ansible role for installing k3s as either a standalone server or HA cluster.
Alternatives To Ansible Role Kubernetes
Select To Compare


Alternative Project Comparisons
Readme

Ansible Role: Kubernetes

Tests Ansible Galaxy License

Role to install the Kubernetes container cluster manager.

Requirements

  • Ansible >= 2.9

  • Linux Distribution

    • Debian Family

      • Ubuntu

        • Bionic (18.04)
        • Focal (20.04)

Role Variables

The following variables will change the behavior of this role (default values are shown below):

# Node type: determines what features are installed.
# - controller:
#     - kubectl
# - worker:
#     - kubelet
#     - kubernetes-cni
# - master:
#     - kubelet
#     - kubectl
#     - kubernetes-cni
# - admin:
#     - kubelet
#     - kubectl
#     - kubeadm
#     - kubernetes-cni
kubernetes_node_type: worker

# The ID of the APT key for the Kubernetes repository (optional)
kubernetes_apt_key_id:

Example Playbook

- hosts: servers
  roles:
    - role: gantsign.kubernetes
      kubernetes_node_type: worker

Tab Completion & Aliases for Zsh

Using Ansible

We recommended using the gantsign.antigen role to enable Zsh support for Kubernetes (this must be configured for each user).

- hosts: servers
  roles:
    - role: gantsign.kubernetes
      kubernetes_node_type: worker

    - role: gantsign.antigen
      users:
        - username: example
          antigen_libraries:
            - name: oh-my-zsh
          antigen_bundles:
            # Use the Oh My Zsh plugin for kubectl
            - name: kubectl
            # Use the GantSign plugin for kubeadm
            - name: kubeadm
              url: gantsign/zsh-plugins
              location: kubeadm

Using Antigen

If you prefer to use Antigen directly add the following to your Antigen configuration:

antigen use oh-my-zsh
antigen bundle kubectl
antigen bundle gantsign/zsh-plugins kubeadm

Important: there's a bug with the current version of Antigen that prevents it working with the kubectl plugin. We recommend using version 2.0.2 of Antigen until the issue is fixed.

Manual configuration

To manually configure Zsh tab completion add the following to your .zshrc:

eval "$(kubectl completion zsh)"
eval "$(kubeadm completion zsh)"

More Roles From GantSign

You can find more roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses Molecule to aid in the development and testing; the role is unit tested using Testinfra and pytest.

To develop or test you'll need to have installed the following:

Because the above can be tricky to install, this project includes Molecule Wrapper. Molecule Wrapper is a shell script that installs Molecule and it's dependencies (apart from Linux) and then executes Molecule with the command you pass it.

To test this role using Molecule Wrapper run the following command from the project root:

./moleculew test

Note: some of the dependencies need sudo permission to install.

License

MIT

Author Information

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)

Popular Kubernetes Projects
Popular Role Projects
Popular Virtualization Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Shell
Kubernetes
Ansible
Role
Zsh
Molecule