
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A https://www.pulumi.com/ project in Go to create Hetzner instances and install a kubernetes cluster on them using kubeadm
Create a local folder on your machine that will be used to store the configuration and generated kubeconfig files. Keep this folder secure since it contains sensitive information.
shellmkdir ~/hcloud-cluster
Start the container and mount the folder you just created in it. Pass your Hetzner API Key/Token as an env variable to the container
shelldocker run -it \ -v ~/hcloud-cluster:/home/pulumi-hcloud-kubeadm/vars \ -e HCLOUD_TOKEN=xxxxxxxxxxxxxxxxxx \ docker.io/samene/pulumi-hcloud-kubeadm:v1.0.0
For the first run, you will be asked to set a password to store the encrypted keys.
shellCreated stack 'production' Enter your passphrase to protect config/secrets: **** Re-enter your passphrase to confirm: **** pulumi-hcloud-kubeadm@963b9474dc97:~$
A default configuration will be created at first startup. To setup your own configuration follow the steps below
Set configuration for compute and networking by running below commands or directly editing the file ./vars/Pulumi.production.yaml
shellpulumi config set dataCenter ash-dc1 # replace with your desired datacenter pulumi config set networkZone us-east # replace with your desired hcloud network zone pulumi config set image ubuntu-22.04 # replace with your desired os image (ubuntu-22.04 or centos-7 or centos-stream-8) pulumi config set bastionFlavor cpx11 # replace with your desired flavor for bastion/NAT node pulumi config set masterFlavor cpx31 # replace with your desired flavor for clontrol plane nodes pulumi config set workerFlavor cpx41 # replace with your your desired flavor for worker nodes pulumi config set lbType lb11 # replace with your desired flavor forload balancer type pulumi config set sshUser root # replace with ssh user name (usually root)
A sample topology.yaml is created in ./vars/ folder. Edit this file as per your configuration.
yamlclusters: central: cri: containerd # containerd or docker (defaults to containerd) cni: flannel # flannel or cilium kubernetes_version: 1.26 # the highest patch version will be selected automatically private_registry: my-docker-registry.com:5000 insecure_registries: # list of docker registries to add to insecure registries - "10.90.84.113:5000" load_balancer: create: true # create a load balancer node port_mappings: # target port mappings https: source: 443 target: 31390 http: source: 80 target: 31394 control_plane: node_count: 3 # 1 or 3 (if 3, one Load Balancer will be created) worker: node_count: 4 # if 0, control plane will be untainted to schedule workloads edge-1: cri: docker cni: flannel kubernetes_version: 1.23 private_registry: my-docker-registry.com:5000 insecure_registries: [] load_balancer: create: true port_mappings: tls: source: 15443 target: 31391 control_plane: node_count: 1 worker: node_count: 0
pulumi up
The generated kubeconfig files will be saved to ./vars/ folder and can also be fetched using
pulumi stack output clusters
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务