Skip to content
Snippets Groups Projects
Commit 414d475d authored by youngsuKim-CSUSB's avatar youngsuKim-CSUSB
Browse files

Add yaml files

parent fee318c4
No related branches found
No related tags found
No related merge requests found
apiVersion: apps/v1
kind: Deployment
metadata:
name: sagemath
labels:
k8s-app: sagemath
# Change below to your namespace; bypasses -n namesapce
# namespace: csusb-ykim
spec:
replicas: 1
selector:
matchLabels:
k8s-app: sagemath
template:
metadata:
labels:
k8s-app: sagemath
spec:
containers:
- name: sagemath
image: gitlab-registry.nrp-nautilus.io/youngsu_kim/csusb-meyer-sagemath/sagemath/sagemath:latest
# Above image is from
# sagemath/sagemath:9.1
resources:
limits:
memory: "2G"
cpu: "2"
# nvidia.com/gpu: "1"
requests:
memory: "1G"
cpu: "1"
# nvidia.com/gpu: "0"
command: ["sh", "-c", "ln -s /mnt/examplevol/ ~/pvc-sage-meyer && cd pvc-sage-meyer ; sage -n jupyter --no-browser --ip='0.0.0.0' && sleep infinity"]
# command: ["sh", "-c", "ln -s /mnt/examplevol/ ~/pvc-sage-meyer && cd pvc-sage-meyer && sage -n jupyter --no-browser --ip='0.0.0.0' && sleep infinity"]
# Below requires having a PVC running
volumeMounts:
- mountPath: /mnt/examplevol
name: examplevol
volumes:
- name: examplevol
persistentVolumeClaim:
claimName: sagemath-meyer
# ---
# apiVersion: v1
# kind: Service
# metadata:
# labels:
# k8s-app: sagemath
# name: sagemath-svc
# spec:
# ports:
# - port: 8888
# protocol: TCP
# targetPort: 8888
# # The name of the selecter needs to match with metadata.labels.k8s-app
# selector:
# k8s-app: sagemath
# type: ClusterIP
\ No newline at end of file
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: haproxy
name: sagemath-ingress
spec:
rules:
- host: sagemath.nrp-nautilus.io
http:
paths:
- path: /
pathType: Prefix
# Maybe the following name needs to match with the one in service.metadata.labels.k8s-app
backend:
service:
name: sagemath-svc
port:
number: 8888
tls:
- hosts:
- sagemath.nrp-nautilus.io
\ No newline at end of file
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sagemath-meyer
# namespace: csusb-ykim
spec:
storageClassName: rook-ceph-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
# Chage the size above if necessary
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: sagemath
name: sagemath-svc
spec:
ports:
- port: 8888
protocol: TCP
targetPort: 8888
# The name of the selecter needs to match with metadata.labels.k8s-app
selector:
k8s-app: sagemath
type: ClusterIP
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment