Skip to content

Instantly share code, notes, and snippets.

@tardieu
Last active August 6, 2019 18:21
Show Gist options
  • Save tardieu/4789e48bbd81700196a0e7dc52be2dd3 to your computer and use it in GitHub Desktop.
Save tardieu/4789e48bbd81700196a0e7dc52be2dd3 to your computer and use it in GitHub Desktop.
YAML for SolSA Hello World Example
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
ports:
- port: 8080
targetPort: 8080
selector:
solsa.ibm.com/pod: hello-world
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
spec:
replicas: 1
selector:
matchLabels:
solsa.ibm.com/pod: hello-world
template:
metadata:
labels:
solsa.ibm.com/pod: hello-world
spec:
containers:
- env:
- name: PORT
value: "8080"
image: docker.io/ibmcom/kn-helloworld
livenessProbe:
tcpSocket:
port: 8080
name: hello-world
ports:
- containerPort: 8080
readinessProbe:
tcpSocket:
port: 8080
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hello-world
spec:
rules:
- host: hello-world.mycluster-123456.us-south.containers.appdomain.cloud
http:
paths:
- backend:
serviceName: hello-world
servicePort: 8080
path: /
tls:
- hosts:
- hello-world.mycluster-123456.us-south.containers.appdomain.cloud
secretName: mycluster-123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment