Skip to content

Instantly share code, notes, and snippets.

@serragnoli
Last active July 19, 2018 10:42
Show Gist options
  • Select an option

  • Save serragnoli/d5240d437ed00ad257f3bdc4a4dae701 to your computer and use it in GitHub Desktop.

Select an option

Save serragnoli/d5240d437ed00ad257f3bdc4a4dae701 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
tasks:
- name: Create a k8s namespace
k8s:
name: testing
api_version: v1
kind: Namespace
state: present
- name: Create a Service object from an inline definition
k8s:
state: present
definition:
apiVersion: v1
kind: Service
metadata:
name: web
namespace: testing
labels:
app: galaxy
service: web
spec:
selector:
app: galaxy
service: web
ports:
- protocol: TCP
targetPort: 80
name: port-80-tcp
port: 80
- name: Deploy Tumtum
k8s:
state: present
src: ./tutum.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment