Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added instructions to install on kubernetes #2003

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [macOS](#macos)
- [Standalone Releases](#standalone-releases)
- [Docker](#docker)
- [Kubernetes - Amazon EKS](#kubernetes-amazon-eks)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -185,3 +186,7 @@ Our official image supports `amd64` and `arm64`.
For `arm32` support there is a popular community maintained alternative:

https://hub.docker.com/r/linuxserver/code-server

## Kubernetes Amazon EKS

> kubectl apply -f https://raw.githubusercontent.com/prabhatsharma/code-server/master/doc/kubernetes.yaml
82 changes: 82 additions & 0 deletions doc/kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: v1
kind: Namespace
metadata:
name: vscode
---

apiVersion: v1
kind: Service
metadata:
name: vscode
namespace: vscode
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:123992344789:certificate/77b2a158-4ae5-4fe2-8eb5-617c03d555ed
# service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
labels:
app: vscode
spec:
ports:
- port: 80 # port 443 if using ssl
name: https
targetPort: 8080
type: LoadBalancer
selector:
app: vscode
---

apiVersion: v1
kind: ConfigMap
metadata:
name: vscode
labels:
app: vscode
data:
config.yaml: |
bind-addr: 127.0.0.1:8080
auth: password
password: complexpassword123
cert: false
---

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vscode
namespace: vscode
spec:
serviceName: "vscode"
replicas: 1
selector:
matchLabels:
app: vscode
template:
metadata:
labels:
app: vscode
spec:
containers:
- name: code-server
image: codercom/code-server:latest
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: home
mountPath: /home/coder/projects
- name: config
mountPath: /home/coder/.config/code-server
volumes:
- name: config
configMap:
name: vscode
volumeClaimTemplates:
- metadata:
name: home
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi



Comment on lines +80 to +82
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change