Kubernetes
As the SDK is available as a Docker image, it can easily be deployed to Kubernetes. The following example shows how to deploy the SDK to Kubernetes with a simple config file.
apiVersion: v1
kind: Namespace
metadata:
name: synthesized
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: synth
namespace: synthesized
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 8Gi
---
apiVersion: v1
data:
SYNTHESIZED_KEY: <Synthesized Licence Key>
kind: Secret
metadata:
creationTimestamp: null
name: synth
namespace: synthesized
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: synth
namespace: synthesized
spec:
replicas: 1
selector:
matchLabels:
tag: synth
template:
metadata:
labels:
tag: synth
spec:
containers:
- name: synthesized
image: synthesizedio/synthesized-notebook:latest
envFrom:
- secretRef:
name: synth
---
apiVersion: v1
kind: Service
metadata:
name: synthesized-entrypoint
namespace: synthesized
spec:
type: NodePort
selector:
tag: synth
ports:
- port: 8888
targetPort: 8888
nodePort: 30001
The above config file creates a namespace, a persistent volume claim, a secret, and a deployment. The deployment creates a single pod with the SDK image. The pod is exposed via a service on port 8888. The service is exposed on port 30001 on the node. The secret contains the license key for the SDK.
The following command can be used to deploy the config file to Kubernetes:
kubectl apply -f synth.yaml