Skip to content

Instantly share code, notes, and snippets.

@sdeoras
Last active March 15, 2023 19:03
Show Gist options
  • Save sdeoras/4592c64ca48573a0d7a3aabdc86a235a to your computer and use it in GitHub Desktop.
Save sdeoras/4592c64ca48573a0d7a3aabdc86a235a to your computer and use it in GitHub Desktop.
deploy julia-pluto notebook
apiVersion: v1
kind: Namespace
metadata:
name: julia-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: julia
labels:
app.kubernetes.io/instance: julia
app.kubernetes.io/name: julia
namespace: julia-system
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: julia
app.kubernetes.io/name: julia
template:
metadata:
labels:
app.kubernetes.io/instance: julia
app.kubernetes.io/name: julia
spec:
containers:
- name: julia
image: docker.io/library/julia:1.6.2
imagePullPolicy: IfNotPresent
command:
- julia
args:
- -e
- >-
using Pkg;
Pkg.add("Pluto");
Pkg.add("PlutoUI");
Pkg.add("Plots");
Pkg.add("CSV");
Pkg.add("DataFrames");
Pkg.precompile();
using Pluto, PlutoUI, Plots, DataFrames;
Pluto.run(
launch_browser=false,
host="0.0.0.0",
port=1234,
require_secret_for_open_links=false,
require_secret_for_access=false,
)
---
apiVersion: v1
kind: Service
metadata:
name: julia
namespace: julia-system
spec:
ports:
- name: service
port: 80
protocol: TCP
targetPort: 1234
selector:
app.kubernetes.io/instance: julia
app.kubernetes.io/name: julia
type: ClusterIP
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment