Difference between revisions of "Kubernetes.core.k8s Ansible module"
Jump to navigation
Jump to search
(Created page with "{{lc}} kubernetes.core.k8s * {{Ansible modules}}") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | * https://docs.ansible.com/ansible/latest/collections/kubernetes/core/k8s_module.html | ||
+ | kubernetes.core.k8s | ||
+ | |||
+ | |||
+ | |||
+ | Create a [[namespace]]: | ||
+ | - name: Create a k8s namespace | ||
+ | kubernetes.core.k8s: | ||
+ | name: testing | ||
+ | api_version: v1 | ||
+ | [[kind: Namespace]] | ||
+ | [[state: present]] | ||
+ | |||
+ | Apply a manifest: | ||
+ | - name: Apply metrics-server manifest to the cluster. | ||
+ | kubernetes.core.k8s: | ||
+ | state: present | ||
+ | src: ~/metrics-server.yaml | ||
− | |||
+ | * <code>[[api_key]]</code> - [[Token]] used to authenticate with the API. Can also be specified via <code>[[K8S_AUTH_API_KEY]]</code> [[environment variable]]. | ||
+ | == See also == | ||
+ | * {{Ansible K8s module}} | ||
* {{Ansible modules}} | * {{Ansible modules}} | ||
+ | |||
+ | [[Category:Ansible]] | ||
+ | [[Category:K8s]] |
Latest revision as of 14:42, 24 November 2022
kubernetes.core.k8s
Create a namespace:
- name: Create a k8s namespace kubernetes.core.k8s: name: testing api_version: v1 kind: Namespace state: present
Apply a manifest:
- name: Apply metrics-server manifest to the cluster. kubernetes.core.k8s: state: present src: ~/metrics-server.yaml
api_key
- Token used to authenticate with the API. Can also be specified viaK8S_AUTH_API_KEY
environment variable.
See also[edit]
- kubernetes.core.k8s Ansible module
- Ansible modules:
gather_facts, set_fact
,ansible.builtin.file
,lineinfile
,stat
,group
,mount
,git:
,package:
,command:
,shell:
,raw:
,template:
,register:
,user:
, Ansible playbooks examples,tasks:
,lineinfile, blockinfile:
,shell:
,command:
,raw:
,ansible.builtin.file, service:, aws.ecs_taskdefinition, aws.asg, docker_container, kubernetes.core.k8s
,community.
,include_tasks
Advertising: