跳到主要内容

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

浏览文件

k0s.yaml

69 行 · 1.9 KB历史下载
1# Deploy kubernetes via k0s (which installs a bundled containerd).
2# $ limactl start ./k0s.yaml
3# $ limactl shell k0s 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 k0s --format 'unix://{{.Dir}}/copied-from-guest/kubeconfig.yaml')
9# $ kubectl get no
10# NAME STATUS ROLES AGE VERSION
11# lima-k0s Ready control-plane 2m48s v1.33.2+k0s
12
13minimumLimaVersion: 2.0.0
14
15base: template:_images/ubuntu-lts
16
17# Mounts are disabled in this template, but can be enabled optionally.
18mounts: []
19
20# containerd is managed by k0s, not by Lima, so the values are set to false here.
21containerd:
22 system: false
23 user: false
24
25provision:
26- mode: system
27 script: |
28 #!/bin/bash
29 set -eux -o pipefail
30 command -v k0s >/dev/null 2>&1 && exit 0
31
32 # install k0s prerequisites
33 curl -sfL https://get.k0s.sh | sh
34
35- mode: system
36 script: |
37 #!/bin/bash
38 set -eux -o pipefail
39
40 # start k0s as a single node cluster
41 if ! systemctl status k0scontroller >/dev/null 2>&1; then
42 k0s install controller --single
43 fi
44
45 systemctl start k0scontroller
46
47probes:
48- description: "k0s to be running"
49 script: |
50 #!/bin/bash
51 set -eux -o pipefail
52 if ! timeout 30s bash -c "until sudo test -f /var/lib/k0s/pki/admin.conf; do sleep 3; done"; then
53 echo >&2 "k0s kubeconfig file has not yet been created"
54 exit 1
55 fi
56 hint: |
57 The k0s control plane is not ready yet.
58 Run "limactl shell k0s sudo journalctl -u k0scontroller" to debug.
59
60copyToHost:
61- guest: "/var/lib/k0s/pki/admin.conf"
62 host: "{{.Dir}}/copied-from-guest/kubeconfig.yaml"
63 deleteOnStop: true
64message: |
65 To run `kubectl` on the host (assumes kubectl is installed), run the following commands:
66 ------
67 export KUBECONFIG="{{.Dir}}/copied-from-guest/kubeconfig.yaml"
68 kubectl ...
69 ------