kubernetes_rbac
ansible-role-kubernetes-rbac
This role allows you to create Role, ClusterRole, RoleBinding and ClusterRoleBinding Kubernetes resources.
Requirements
This role uses the community.kubernetes.k8s module which needs some requirements.
Role Variables
- k8s_roles: A list of parameters for Role resources that will be created
- k8s_clusterroles: A list of parameters for ClusterRole resources that will be created
- k8s_rolebindings: A list of parameters for RoleBinding resources that will be created
- k8s_clusterrolebindings: A list of parameters for ClusterRoleBinding resources that will be created
Check the defaults/main.yml for some examples.
Switching between Kubernetes cluster
Read through the community.kubernetes.k8s module documentation to understand how to set the Kubernetes cluster to work on.
Example Playbook
- hosts: localhost
roles:
- role: ansible-role-kubernetes-rbac
k8s_roles:
- name: pod-reader
namespace: default
rules:
- resources: ["pods"]
verbs: ["get", "watch", "list"]
k8s_rolebindings:
- name: read-pods
namespace: default
users:
- name: jane
groups:
- name: pod-readers
role: pod-reader
License
MIT
Author Information
Max Brenner xamrennerb@gmail.com
About
This role allows you to create Role, ClusterRole, RoleBinding and ClusterRoleBinding Kubernetes resources.
Install
ansible-galaxy install brennerm/ansible-role-kubernetes-rbac
License
Unknown
Downloads
22
Owner
Automate all the things!