当前位置:网站首页>在 Kubernetes 集群上部署 VSCode
在 Kubernetes 集群上部署 VSCode
2022-06-13 10:05:00 【华为云】
在 Kubernetes 集群上部署 VSCode
Visual Studio Code
Visual Studio Code 是一个轻量级但功能强大的源代码编辑器,可在您的桌面上运行,适用于 Windows、macOS 和 Linux。它内置了对 JavaScript、TypeScript 和 Node.js 的支持,并为其他语言(如 C++、C#、Java、Python、PHP、Go)和运行时(如 .NET 和 Unity)提供了丰富的扩展生态系统.
开发工具来说云端 IDE 也逐渐受到大家重视,Visual Studio Code 有官方web版本,由于访问不太稳定可以借助Code-Server部署在本地环境。
官方地址:https://vscode.dev/
传统方式安装
# 安装curl -fsSL https://code-server.dev/install.sh | sh# 查看配置cat .config/code-server/config.yaml bind-addr: 0.0.0.0:8080auth: passwordpassword: c5d4b8deec690d04e81ef0d5cert: falsedocker方式安装
# 启用容器mkdir -p ~/.configdocker run -d --name code-server \-p 8080:8080 \-v "$HOME/.config:/home/coder/.config" \-v "$PWD:/home/coder/project" \-u "$(id -u):$(id -g)" \-e "DOCKER_USER=$USER" \codercom/code-server:latest # 查看密码docker exec -it code-server cat ~/.config/code-server/config.yamlbind-addr: 127.0.0.1:8080auth: passwordpassword: cca029c905426a228d46d3eacert: falsekubernetes方式安装
apiVersion: v1kind: Namespacemetadata: name: code-server---apiVersion: v1kind: Servicemetadata: name: code-server namespace: code-serverspec: type: NodePort selector: app: code-server ports: - port: 80 targetPort: 8080---apiVersion: apps/v1kind: Deploymentmetadata: name: code-server namespace: code-server labels: app: code-serverspec: replicas: 3 strategy: rollingUpdate: maxSurge: 3 maxUnavailable: 3 type: RollingUpdate selector: matchLabels: app: code-server template: metadata: labels: app: code-server spec: containers: - name: code-server image: codercom/code-server imagePullPolicy: IfNotPresent env: - name: PASSWORD value: "123123" resources: limits: memory: "512Mi" cpu: "4096m" ports: - containerPort: 8080kubernetes方式验证测试
kubectl get svc -n code-server NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEcode-server NodePort 10.97.52.132 <none> 80:31274/TCP 2d21hcurl -I 192.168.1.61:31274HTTP/1.1 302 FoundLocation: ./loginVary: Accept, Accept-EncodingContent-Type: text/plain; charset=utf-8Content-Length: 29Date: Mon, 13 Jun 2022 01:11:16 GMTConnection: keep-aliveKeep-Alive: timeout=5关于
https://www.oiox.cn/index.php/start-page.html
CSDN、GitHub、知乎、微信公众号、开源中国、思否、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客、全网可搜《小陈运维》
文章主要发布于微信公众号
边栏推荐
猜你喜欢

Leetcode (question 15) - sum of three numbers

聊聊 C# 方法重载的底层玩法

Trees and binary trees: the concept of binary trees

Overloading of typical operators
![[51nod p3216] Award [bit operation]](/img/f2/109fb126d026951ffd766781223052.jpg)
[51nod p3216] Award [bit operation]

Node red series (25): integrate Gaode map and realize 3D map and track playback

ASCII码值是怎么计算的,怎么计算arccos的值

多线程 从UE4的无锁队列开始 (线程安全)

UNIX Environment advanced programming --3-file io---3.10 file sharing

检验冗余码是否出错题型解法-摘录
随机推荐
隐私计算FATE-核心概念与单机部署
Node-RED系列(二五):集成高德地图并实现3d地图和轨迹回放
Instruction level parallelism (?)
(dijkstra+ shortest path + edge traversal 0 (m)) acwing 850 Dijkstra finding the shortest path II
Biden: hope to sign the bipartisan gun safety reform bill as soon as possible
Trees and binary trees: the concept of binary trees
大O记法解释
Knowledge points of silicon steel sheet
Execution order of subclass and parent constructor
Node-RED系列(二四):在Node-RED中使用mysql节点实现数据库的增删改查
The rise of cloud computing enterprises and the shaking of Oracle database market dominance
Leetcode (question 15) - sum of three numbers
Classes and objects -- polymorphic
【动态规划】入门篇
全栈开发实战|SSM框架整合开发
About the problem of database: it can't be found after repeated inspection
C 11 new feature: static abstract members in interfaces
计算循环冗余码--摘录
[51nod p3216] Award [bit operation]
简述请求过程