gf-k8s/jupyter.yaml
Andrey Kartashov afe9f33b97 Added jupyter
2018-05-27 01:36:55 +07:00

73 lines
1.4 KiB
YAML

---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: jupyter
labels:
app: jupyter
spec:
replicas: 1
selector:
matchLabels:
app: jupyter
template:
metadata:
labels:
app: jupyter
spec:
hostname: jupyter
volumes:
- name: jupyter
hostPath:
path: /data/home/jupyter
type:
containers:
- name: jupyter
image: jupyter/minimal-notebook
imagePullPolicy: IfNotPresent
args:
- start-notebook.sh
- "--ip='*'"
- "--port=8888"
- "--no-browser"
- "--config=/home/jovyan/work/.config.py"
ports:
- containerPort: 8888
name: jupyter
volumeMounts:
- mountPath: /home/jovyan/work
name: jupyter
---
kind: Service
apiVersion: v1
metadata:
name: jupyter
spec:
selector:
app: jupyter
ports:
- name: jupyter
protocol: TCP
port: 80
targetPort: jupyter
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: jupyter
annotations:
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 32m
spec:
tls:
- secretName: jupyter-gorilych-ru-tls
hosts:
- jupyter.gorilych.ru
rules:
- host: jupyter.gorilych.ru
http:
paths:
- backend:
serviceName: jupyter
servicePort: 80