在 GKE 上使用自定义 nginx.conf
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如果您想要在 Google Kubernetes Engine 上使用自定义 nginx.conf
,请通过扩展此示例 nginx.conf 准备一个。以下是 Cloud Endpoints 所需配置的代码段:
现在,使用 kubectl
创建包含自定义 nginx.conf
的 Kubernetes Configmap:
kubectl create configmap nginx-config --from-file=nginx.conf
修改 Kubernetes 配置文件(例如 esp_echo_custom_config_gke.yaml
),并将 SERVICE_NAME
替换为您的 Endpoints 服务的名称。
最后,运行 kubectl
命令,使用更新后的 Kubernetes 配置文件来启动服务。
kubectl create -f esp_echo_custom_config_gke.yaml
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-05。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u6700\u540e\u66f4\u65b0\u65f6\u95f4 (UTC)\uff1a2024-10-05\u3002"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-10-05。"]]