apiVersion: v1 kind: Namespace metadata: name: navigation --- # ▼▼▼ 核心知识点:ConfigMap ▼▼▼ apiVersion: v1 kind: ConfigMap metadata: name: homepage-config namespace: navigation data: # 配置文件 1: 定义小组件 (显示时间、搜索框、资源占用) widgets.yaml: | - search: provider: google target: _blank - resources: cpu: true memory: true disk: true - datetime: text_size: xl format: timeStyle: short # 配置文件 2: 定义您的服务链接 (请注意看下面的 icon 和 href) services.yaml: | - 我的应用: - 个人博客: icon: wordpress.png href: https://blog.u9.net3w.com description: 我的数字花园 - 远程桌面: icon: linux.png href: https://wt.u9.net3w.com description: K8s 外部反代测试 - 基础设施: - 状态监控: icon: uptime-kuma.png href: https://status.u9.net3w.com description: Uptime Kuma widget: type: uptimekuma url: http://kuma-service.monitoring.svc.cluster.local # ▼ 重点:K8s 内部 DNS slug: my-wordpress-blog # (高级玩法:稍后填这个) - 存储管理: icon: longhorn.png href: https://storage.u9.net3w.com description: 分布式存储面板 widget: type: longhorn url: http://longhorn-frontend.longhorn-system.svc.cluster.local # 配置文件 3: 基础设置 settings.yaml: | title: K3s 指挥中心 background: https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1920&q=80 theme: dark color: slate