跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

rke2.yaml

62 行 · 2.1 KB历史下载
1# Deploy kubernetes via rke2 (which installs a bundled containerd).
2# $ limactl start ./rke2.yaml
3# $ limactl shell rke2 sudo kubectl
4#
5# It can be accessed from the host by exporting the kubeconfig file;
6# the ports are already forwarded automatically by lima:
7#
8# $ export KUBECONFIG=$(limactl list rke2 --format 'unix://{{.Dir}}/copied-from-guest/kubeconfig.yaml')
9# $ kubectl get no
10# NAME STATUS ROLES AGE VERSION
11# lima-rke2 Ready control-plane,etcd,master 68s v1.27.3+rke2r1
12#
13# For more details of RKE2, please refer to https://docs.rke2.io/
14
15minimumLimaVersion: 2.0.0
16
17base: template:_images/ubuntu-lts
18
19# Mounts are disabled in this template, but can be enabled optionally.
20mounts: []
21
22# containerd is managed by rke2, not by Lima, so the values are set to false here.
23containerd:
24 system: false
25 user: false
26
27provision:
28- mode: system
29 script: |
30 #!/bin/sh
31 if [ ! -d /var/lib/rancher/rke2 ]; then
32 curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=v1.34 sh -
33 fi
34 env | grep "http_proxy\|https_proxy\|no_proxy" > /etc/default/rke2-server
35 sed -i "s/http_proxy/CONTAINERD_HTTP_PROXY/g" /etc/default/rke2-server
36 sed -i "s/https_proxy/CONTAINERD_HTTPS_PROXY/g" /etc/default/rke2-server
37 sed -i "s/no_proxy/CONTAINERD_NO_PROXY/g" /etc/default/rke2-server
38
39 systemctl start rke2-server.service
40
41probes:
42- script: |
43 #!/bin/bash
44 set -eux -o pipefail
45 if ! timeout 30s bash -c "until test -f /etc/rancher/rke2/rke2.yaml; do sleep 3; done"; then
46 echo >&2 "rke2 is not running yet"
47 exit 1
48 fi
49 hint: |
50 The rke2 kubeconfig file has not yet been created.
51 Run "limactl shell rke2 sudo journalctl -u rke2-server" to check the log.
52 If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log".
53copyToHost:
54- guest: "/etc/rancher/rke2/rke2.yaml"
55 host: "{{.Dir}}/copied-from-guest/kubeconfig.yaml"
56 deleteOnStop: true
57message: |
58 To run `kubectl` on the host (assumes kubectl is installed), run the following commands:
59 ------
60 export KUBECONFIG="{{.Dir}}/copied-from-guest/kubeconfig.yaml"
61 kubectl ...
62 ------