Skip to content

Instantly share code, notes, and snippets.

@mikamboo
Last active February 13, 2020 22:17
Show Gist options
  • Save mikamboo/4fcc9a9735bc413cf84f3b834c116bf2 to your computer and use it in GitHub Desktop.
Save mikamboo/4fcc9a9735bc413cf84f3b834c116bf2 to your computer and use it in GitHub Desktop.
K8S : Deploy code server online IDE
kind: Secret
apiVersion: v1
metadata:
name: code-server-secret
namespace: ${NAMESPACE}
stringData:
password: ${PASSWORD}
type: Opaque
kind: Deployment
apiVersion: apps/v1
metadata:
name: code-server
namespace: ${NAMESPACE}
labels:
app: code-server
spec:
replicas: 1
selector:
matchLabels:
app: code-server
template:
metadata:
labels:
app: code-server
spec:
volumes:
- name: cache-volume
emptyDir: {}
containers:
- resources: {}
name: code-server
env:
- name: PASSWORD
valueFrom:
secretKeyRef:
name: code-server-secret
key: password
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- name: cache-volume
mountPath: /.local
terminationMessagePolicy: File
image: mikamboo/code-server
args:
- '--auth'
- password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment