Last active
April 24, 2019 22:33
-
-
Save JohnKDay/be096fdca65b18435b6b3d7ae6395cd5 to your computer and use it in GitHub Desktop.
Run coder IDE in k8s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command to run vscode server in Kubernetes. | |
# derived from | |
# docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --no-auth | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: coder-ide-vol | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 20Gi | |
--- | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: coder-ide | |
spec: | |
selector: | |
matchLabels: | |
app: coder-ide | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: coder-ide | |
spec: | |
containers: | |
- image: "codercom/code-server:latest" | |
imagePullPolicy: Always | |
name: coder-ide | |
args: [ "--allow-http" , "--no-auth" ] | |
ports: | |
- containerPort: 8443 | |
volumeMounts: | |
- mountPath: /home/coder/project | |
name: coder-ide-data | |
restartPolicy: Always | |
volumes: | |
- name: coder-ide-data | |
persistentVolumeClaim: | |
claimName: coder-ide-vol | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: coder-ide | |
labels: | |
run: http | |
spec: | |
type: NodePort | |
ports: | |
- port: 8443 | |
targetPort: 8443 | |
protocol: TCP | |
selector: | |
app: coder-ide |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment