mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 01:49:44 +00:00
77 lines
1.5 KiB
YAML
77 lines
1.5 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
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: DirectoryOrCreate
|
|
containers:
|
|
- name: jupyter
|
|
image: gorilych/jupyter:v0.0.3
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: LANG
|
|
value: ru
|
|
- name: LD_LIBRARY_PATH
|
|
value: /opt/conda/lib
|
|
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:
|
|
nginx.ingress.kubernetes.io/proxy-body-size: 32m
|
|
spec:
|
|
tls:
|
|
- secretName: san-gorilych-ru-tls
|
|
hosts:
|
|
- jupyter.gorilych.ru
|
|
rules:
|
|
- host: jupyter.gorilych.ru
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: jupyter
|
|
servicePort: 80
|
|
|