VSCODEについてk8sで構築できるように修正
This commit is contained in:
parent
ac33570a5c
commit
7b7e94b25a
6
infra/k8s/README.md
Normal file
6
infra/k8s/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# k8sでデプロイする方法
|
||||
|
||||
```sh
|
||||
kubectl apply -f https://gitea.pglikers.com/vscode/vscode-server-dev/raw/branch/main/infra/k8s/app.yaml
|
||||
kubectl port-forward svc/code-server 8080:80
|
||||
```
|
||||
33
infra/k8s/app.yaml
Normal file
33
infra/k8s/app.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: code-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: code-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: code-server
|
||||
spec:
|
||||
containers:
|
||||
- name: code-server
|
||||
image: codercom/code-server:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: PASSWORD
|
||||
value: "changeme"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: code-server
|
||||
spec:
|
||||
selector:
|
||||
app: code-server
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
Loading…
x
Reference in New Issue
Block a user