community.kubernetes.k8s_service – Manage Services on Kubernetes¶
Note
This plugin is part of the community.kubernetes collection (version 1.2.1).
To install it use: ansible-galaxy collection install community.kubernetes
.
To use it in a playbook, specify: community.kubernetes.k8s_service
.
Synopsis¶
Use Openshift Python SDK to manage Services on Kubernetes
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
openshift >= 0.6.2
Parameters¶
Notes¶
Note
The OpenShift Python client wraps the K8s Python client, providing full access to all of the APIS and models available on both platforms. For API version details and additional information visit https://github.com/openshift/openshift-restclient-python
To avoid SSL certificate validation errors when
validate_certs
is True, the full certificate chain for the API server must be provided viaca_cert
or in the kubeconfig file.
Examples¶
- name: Expose https port with ClusterIP
community.kubernetes.k8s_service:
state: present
name: test-https
namespace: default
ports:
- port: 443
protocol: TCP
selector:
key: special
- name: Expose https port with ClusterIP using spec
community.kubernetes.k8s_service:
state: present
name: test-https
namespace: default
inline:
spec:
ports:
- port: 443
protocol: TCP
selector:
key: special
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
KubeVirt Team (@kubevirt)