标签: 运维
22 个内容
笔记(18)
本文深度解析Docker `--build-arg`(配合`ARG`)用于构建时变量注入,支持多环境镜像构建。多阶段构建需跨阶段重新声明ARG。主要方案:声明ARG、命令行注入;避坑用`--secret`传敏感信息、`ENV`持久运行时变量。
Nginx Ingress Controller 启用严格路径类型验证导致`/openapi.json`无法使用`pathType: Exact`的问题,原因是路径包含点(.)等特殊字符。解决方案包括:使用`ImplementationSpecific`路径类型,使用正则表达式匹配,或禁用严格路径验证。推荐优先使用`ImplementationSpecific`。
Kubernetes NGINX Ingress 默认限制请求体大小,导致上传大文件时出现 413 错误。解决方案包括:针对单个 Ingress 服务,通过添加 Annotation `nginx.ingress.kubernetes.io/proxy-body-size` 来设置请求体大小;或者全局修改 ingress-nginx 控制器的 ConfigMap 或 Helm 参数。修改后需重启 ingress-nginx Pod。
PowerShell 5及以上版本可将命令历史记录保存至本地文件。通过`Get-Content (Get-PSReadlineOption).HistorySavePath` 或 `type %APPDATA%\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt` 命令,用户能够直接读取并查看历史命令,便于回顾和复用。
本文介绍了使用 acme.sh 自动申请 SSL 证书的方法,针对腾讯云(DNSPod)和 Cloudflare 域名,分别给出了配置 API Key 并生成证书的示例。同时,还提到了 acme.sh 默认 CA 切换、corncob 失败以及 zsh 报错等常见问题及解决方案。
动态(4)
解决 Failed to create fleet-default/api cluster.x-k8s.io/v1beta1, Kind=Cluster for rke-cluster fleet-default/api: Internal error occurred: failed calling webhook "default.cluster.cluster.x-k8s.io": failed to call webhook: Post "https://capi-webhook-service.cattle-provisioning-capi-system.svc:443/mutate-cluster-x-k8s-io-v1beta1-cluster?timeout=10s": service "capi-webhook-service" not found
https://forums.rancher.cn/t/docker-run-rancher-rancher-mirrored-pause/3546/14