mcpField
E
external-urls

external-urls

github.com/julianobarbosa云与 DevOps1491 次安装2 天前更新
代码仓库

关于 external-urls

External URLs 是供 Hypera 多集群 GitOps 基础设施团队使用的速查技能,按环境整理服务、集群 API、代码库和 SMTP 端点,并附带健康检查命令与故障排查建议。

主要功能

  1. 01按环境查找服务 URL
  2. 02查阅集群 API 端点
  3. 03列出 Git 和 Helm 代码库 URL
  4. 04检查 URL 与集群连通性
  5. 05查询 DNS 和证书故障建议

适用场景

  1. 01查找指定环境的服务端点
  2. 02检查需要 VPN 的集群连接
  3. 03验证应用 URL 健康状况
  4. 04排查 DNS 或证书问题

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/julianobarbosa/claude-code-skills --skill external-urls

安装后在 Claude Code 中输入/external-urls确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
urls-detail.md
scripts/
check-urls.sh
list-urls.sh

详细介绍

外部 URL 参考

Hypera 多集群 GitOps 基础设施中所有外部 URL 和端点的快速参考。

快速查找 URL

各环境的应用 URL

Hub(共享服务)

服务URL用途
ArgoCDhttps://argocd.cafehyna.com.brGitOps UI 和 API
Sentryhttps://sentry-hub.cafehyna.hypera.com.br错误跟踪
SonarQubehttps://sonarqube-hub.cafehyna.com.br代码质量
phpMyAdminhttps://dba.cafehyna.com.brMySQL 管理
Adminerhttps://dba2.cafehyna.com.br多数据库管理
Mimirhttps://mimir-hub.cafehyna.com.br指标存储

开发环境

服务URL用途
Sentryhttps://sentry.adocyl.com.br错误跟踪
SonarQubehttps://sonarqube.hypera.com.br代码质量
Grafana OnCallhttps://oncall-dev.cafehyna.com值班管理
phpMyAdminhttps://dev-dba.cafehyna.com.brMySQL 管理
RabbitMQhttps://rabbitmq-painelclientes-dev.cafehyna.com.br消息队列

生产环境

服务URL用途
Sentryhttps://sentry.cafehyna.hypera.com.br错误跟踪

集群 API 端点

所有集群均使用 Azure Private Link(需要 VPN):

集群API 服务器区域
cafehyna-hubhttps://aks-cafehyna-default-b2ie56p8.5bbf1042-d320-432c-bd11-cea99f009c29.privatelink.eastus.azmk8s.io:443美国东部
cafehyna-devhttps://aks-cafehyna-dev-hlg-q3oga63c.30041054-9b14-4852-9bd5-114d2fac4590.privatelink.eastus.azmk8s.io:443美国东部
cafehyna-prdhttps://aks-cafehyna-prd-hsr83z2k.c7d864af-cbd7-481b-866b-8559e0d1c1ea.privatelink.eastus.azmk8s.io:443美国东部
painelclientes-devhttps://akspainelclientedev-dns-vjs3nd48.hcp.eastus2.azmk8s.io:443美国东部 2
painelclientes-prdhttps://akspainelclientesprd-dns-kezy4skd.hcp.eastus2.azmk8s.io:443美国东部 2
loyalty-devhttps://loyaltyaks-qas-dns-d330cafe.hcp.eastus.azmk8s.io:443美国东部

仓库 URL

Git 仓库(Azure DevOps)
仓库URL
infra-teamhttps://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/infra-team
argo-cd-helm-valueshttps://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/argo-cd-helm-values
kubernetes-configurationhttps://[email protected]/hypera/Cafehyna%20-%20Desenvolvimento%20Web/_git/kubernetes-configuration
Helm 仓库
仓库URLCharts
ingress-nginxhttps://kubernetes.github.io/ingress-nginxingress-nginx
jetstackhttps://charts.jetstack.iocert-manager
bitnamihttps://charts.bitnami.com/bitnamiexternal-dns、phpmyadmin、rabbitmq
prometheus-communityhttps://prometheus-community.github.io/helm-chartskube-prometheus-stack
robustahttps://robusta-charts.storage.googleapis.comrobusta
cetichttps://cetic.github.io/helm-chartsadminer
defectdojohttps://raw.githubusercontent.com/DefectDojo/django-DefectDojo/helm-chartsdefectdojo

域名参考

域名用途环境
*.cafehyna.com.br主要应用全部
*.cafehyna.hypera.com.brHypera 品牌服务Hub/Prd
*.adocyl.com.br开发服务Dev
*.hypera.com.br企业服务全部

证书和 DNS

  • 证书颁发方: Let's Encrypt
  • DNS 提供商: Cloudflare
  • ClusterIssuers: letsencrypt-prod、letsencrypt-staging
  • 联系人: [email protected]

SMTP 服务

服务主机环境
Office 365smtp.office365.comHub
SendGridsmtp.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 定义在以下配置文件中:

类别路径模式
应用 Ingressargo-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 清单及其源文件位置:


注意事项

  • Private Link API 端点需要 VPN,而不只是 kubeconfig: 所有 privatelink.eastus.azmk8s.io URL 只能在公司网络内解析。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