Skip to content

Instantly share code, notes, and snippets.

@ricardoaat
Created September 24, 2019 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardoaat/b8132a4a5428e85679b6b4d2573ddbc1 to your computer and use it in GitHub Desktop.
Save ricardoaat/b8132a4a5428e85679b6b4d2573ddbc1 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: default-http-backend
namespace: unichem
spec:
replicas: 1
template:
metadata:
labels:
app: default-http-backend
spec:
terminationGracePeriodSeconds: 60
containers:
- name: default-http-backend
# Any image is permissable as long as:
# 1. It serves a 404 page at /
# 2. It serves 200 on a /healthz endpoint
image: gcr.io/google_containers/defaultbackend:1.0
livenessProbe:
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 5
ports:
- containerPort: 8080
resources:
limits:
cpu: 10m
memory: 20Mi
requests:
cpu: 10m
memory: 20Mi
---
apiVersion: v1
kind: Service
metadata:
name: default-http-backend
namespace: unichem
spec:
selector:
app: default-http-backend
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: unichem-portal
labels:
app: unichem-portal
spec:
selector:
matchLabels:
app: unichem-portal
role: master
tier: frontend
replicas: 1
template:
metadata:
labels:
app: unichem-portal
role: master
tier: frontend
spec:
containers:
- name: unichem-portal
image: dockerhub.ebi.ac.uk/chembl/unichem/unichem-portal:latest
ports:
- containerPort: 3000
imagePullSecrets:
- name: unichem-registry
---
apiVersion: v1
kind: Service
metadata:
name: unichem-portal
namespace: unichem
spec:
selector:
app: unichem-portal
ports:
- protocol: TCP
port: 3000
targetPort: 3000
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: unichem-ingress
namespace: unichem
spec:
rules:
- host: test.hh-wp-webadmin-04.wp-k8s.ebi.ac.uk
http:
paths:
- backend:
serviceName: unichem-portal
servicePort: 3000
path: /uni
- backend:
serviceName: default-http-backend
servicePort: 80
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment