关于 external-urls
External URLs 是供 Hypera 多集群 GitOps 基础设施团队使用的速查技能,按环境整理服务、集群 API、代码库和 SMTP 端点,并附带健康检查命令与故障排查建议。
主要功能
- 01按环境查找服务 URL
- 02查阅集群 API 端点
- 03列出 Git 和 Helm 代码库 URL
- 04检查 URL 与集群连通性
- 05查询 DNS 和证书故障建议
适用场景
- 01查找指定环境的服务端点
- 02检查需要 VPN 的集群连接
- 03验证应用 URL 健康状况
- 04排查 DNS 或证书问题
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ julianobarbosa/ claude-code-skills --skill external-urls安装后在 Claude Code 中输入/external-urls确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/urls-detail.mdscripts/check-urls.shlist-urls.sh详细介绍
外部 URL 参考
Hypera 多集群 GitOps 基础设施中所有外部 URL 和端点的快速参考。
快速查找 URL
各环境的应用 URL
Hub(共享服务)
| 服务 | URL | 用途 |
|---|---|---|
| ArgoCD | https://argocd.cafehyna.com.br | GitOps UI 和 API |
| Sentry | https://sentry-hub.cafehyna.hypera.com.br | 错误跟踪 |
| SonarQube | https://sonarqube-hub.cafehyna.com.br | 代码质量 |
| phpMyAdmin | https://dba.cafehyna.com.br | MySQL 管理 |
| Adminer | https://dba2.cafehyna.com.br | 多数据库管理 |
| Mimir | https://mimir-hub.cafehyna.com.br | 指标存储 |
开发环境
| 服务 | URL | 用途 |
|---|---|---|
| Sentry | https://sentry.adocyl.com.br | 错误跟踪 |
| SonarQube | https://sonarqube.hypera.com.br | 代码质量 |
| Grafana OnCall | https://oncall-dev.cafehyna.com | 值班管理 |
| phpMyAdmin | https://dev-dba.cafehyna.com.br | MySQL 管理 |
| RabbitMQ | https://rabbitmq-painelclientes-dev.cafehyna.com.br | 消息队列 |
生产环境
| 服务 | URL | 用途 |
|---|---|---|
| Sentry | https://sentry.cafehyna.hypera.com.br | 错误跟踪 |
集群 API 端点
所有集群均使用 Azure Private Link(需要 VPN):
| 集群 | API 服务器 | 区域 |
|---|---|---|
| cafehyna-hub | https://aks-cafehyna-default-b2ie56p8.5bbf1042-d320-432c-bd11-cea99f009c29.privatelink.eastus.azmk8s.io:443 | 美国东部 |
| cafehyna-dev | https://aks-cafehyna-dev-hlg-q3oga63c.30041054-9b14-4852-9bd5-114d2fac4590.privatelink.eastus.azmk8s.io:443 | 美国东部 |
| cafehyna-prd | https://aks-cafehyna-prd-hsr83z2k.c7d864af-cbd7-481b-866b-8559e0d1c1ea.privatelink.eastus.azmk8s.io:443 | 美国东部 |
| painelclientes-dev | https://akspainelclientedev-dns-vjs3nd48.hcp.eastus2.azmk8s.io:443 | 美国东部 2 |
| painelclientes-prd | https://akspainelclientesprd-dns-kezy4skd.hcp.eastus2.azmk8s.io:443 | 美国东部 2 |
| loyalty-dev | https://loyaltyaks-qas-dns-d330cafe.hcp.eastus.azmk8s.io:443 | 美国东部 |
仓库 URL
Git 仓库(Azure DevOps)
| 仓库 | URL |
|---|---|
| infra-team | https://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/infra-team |
| argo-cd-helm-values | https://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/argo-cd-helm-values |
| kubernetes-configuration | https://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/kubernetes-configuration |
Helm 仓库
| 仓库 | URL | Charts |
|---|---|---|
| ingress-nginx | https://kubernetes.github.io/ingress-nginx | ingress-nginx |
| jetstack | https://charts.jetstack.io | cert-manager |
| bitnami | https://charts.bitnami.com/bitnami | external-dns、phpmyadmin、rabbitmq |
| prometheus-community | https://prometheus-community.github.io/helm-charts | kube-prometheus-stack |
| robusta | https://robusta-charts.storage.googleapis.com | robusta |
| cetic | https://cetic.github.io/helm-charts | adminer |
| defectdojo | https://raw.githubusercontent.com/DefectDojo/django-DefectDojo/helm-charts | defectdojo |
域名参考
| 域名 | 用途 | 环境 |
|---|---|---|
*.cafehyna.com.br | 主要应用 | 全部 |
*.cafehyna.hypera.com.br | Hypera 品牌服务 | Hub/Prd |
*.adocyl.com.br | 开发服务 | Dev |
*.hypera.com.br | 企业服务 | 全部 |
证书和 DNS
- 证书颁发方: Let's Encrypt
- DNS 提供商: Cloudflare
- ClusterIssuers:
letsencrypt-prod、letsencrypt-staging - 联系人:
[email protected]
SMTP 服务
| 服务 | 主机 | 环境 |
|---|---|---|
| Office 365 | smtp.office365.com | Hub |
| SendGrid | smtp.sendgrid.net | 生产环境 |
快速命令
检查应用 URL 健康状态
# Check ArgoCD
curl -sI https://argocd.cafehyna.com.br | head -1
# Check all hub services
for url in argocd.cafehyna.com.br sentry-hub.cafehyna.hypera.com.br sonarqube-hub.cafehyna.com.br dba.cafehyna.com.br; do
echo -n "$url: "; curl -sI "https://$url" -o /dev/null -w "%{http_code}\n" --connect-timeout 5 2>/dev/null || echo "FAILED"
done
检查集群连通性
# Test cluster API (requires VPN)
curl -sk https://aks-cafehyna-default-b2ie56p8.5bbf1042-d320-432c-bd11-cea99f009c29.privatelink.eastus.azmk8s.io:443/healthz
# Using kubectl
kubectl --kubeconfig ~/.kube/aks-rg-hypera-cafehyna-hub-config cluster-info
检查 Helm 仓库
# Add and update
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update ingress-nginx
# Search charts
helm search repo ingress-nginx
配置文件位置
URL 定义在以下配置文件中:
| 类别 | 路径模式 |
|---|---|
| 应用 Ingress | argo-cd-helm-values/kube-addons/<service>/<cluster>/values.yaml |
| 集群端点 | infra-team/argocd-clusters/<cluster>.yaml |
| Git 仓库 | infra-team/argocd-repos/base/git-repositories/*.yaml |
| Helm 仓库 | infra-team/argocd-repos/base/helm-repositories/*.yaml |
故障排查
| 问题 | 解决方法 |
|---|---|
| 无法访问应用 URL | 检查 ingress-nginx Pod,并在 Cloudflare 中验证 DNS |
| 集群 API 超时 | 验证 VPN 连接,检查 Azure AKS 状态 |
| 证书错误 | 验证 cert-manager ClusterIssuer,并检查 Let's Encrypt 速率限制 |
| DNS 无法解析 | 检查 external-dns 日志,并验证 Cloudflare API token |
脚本
scripts/check-urls.sh- 检查所有应用 URL 的运行状况scripts/list-urls.sh- 按环境或类别列出 URL
详细参考
如需完整的 URL 清单及其源文件位置:
- references/urls-detail.md - 完整的 URL 参考
- docs/external-urls-reference.md - 完整文档
注意事项
- Private Link API 端点需要 VPN,而不只是 kubeconfig: 所有
privatelink.eastus.azmk8s.ioURL 只能在公司网络内解析。VPN 断开时,kubectl会挂起 30 秒后超时,而不会产生明确的 DNS 错误。 cafehyna.com.br和cafehyna.hypera.com.br属于不同的区域: 将记录添加到错误的区域后,传播和浏览器解析看起来都正常,但 cert-manager 的 DNS-01 挑战会失败,因为 ACME 验证器会查询顶级区域的 NS 记录。添加记录前,使用dig NS <domain>验证区域。adocyl.com.br是仅供开发环境使用的域名,不要用于 hub: 跨环境重复使用主机名会导致 Let's Encrypt 暂存环境与生产环境的颁发者范围设置冲突;如果 SonarQube/Sentry 共用顶级域名,各环境之间的会话 Cookie 也会泄漏。- Azure DevOps Git URL 中的项目名称必须进行 URL 编码:
Cafehyna%20-%20Desenvolvimento%20Web必须保留编码形式;原始空格会导致git clone返回难以判断原因的 404。Azure DevOps UI 会隐藏此信息;请从 SSH 选项卡复制,或使用编码后的形式。 - 自 2022 年 10 月起,
smtp.office365.com需要现代身份验证(OAuth2): 租户范围内已禁用 587 端口上的基本身份验证。仍配置为使用用户名和密码的应用会静默失败,并返回535 5.7.139。请使用 SendGrid,或使用绕过 MFA 的应用密码。 - 混用 East US 与 East US 2 集群会导致跨区域 Pod 流量异常: painelclientes(EUS2)和 cafehyna(EUS)集群若未显式配置 VNet 对等互连,就无法共用专用 DNS 区域——Ingress 主机名可以解析,但 Pod 间通信会失败。不要想当然地认为它们可以互通;请先检查区域列。
评论
支持 Markdown