Sunday, August 1, 2021

Run playbook to access k8s with service account mounted.

 

quay.io/operator-framework/ansible-operator:v1.10.0

That image will work if service account with some required collections installed

collections:
- name: community.kubernetes
version: "1.2.1"
- name: operator_sdk.util
version: "0.2.0"
- name: community.general
version: "3.4.0"
- name: community.crypto
version: "1.7.1"

 Use this command to run this playbook


- name: Start fabric operations
  hosts: localhost
  gather_facts: no
  connection: local
  tasks:
    - name: Search for the matching secret of the CA organization
      community.kubernetes.k8s_info:
        kind: Secret
      register: casecret

    - debug:
        var: casecret

ansible-playbook test.yaml -e "ansible_python_interpreter=/usr/bin/python3.8"

No comments:

Post a Comment