惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Webroot Blog
Webroot Blog
T
Threatpost
量子位
大猫的无限游戏
大猫的无限游戏
C
Cisco Blogs
腾讯CDC
N
News | PayPal Newsroom
T
Troy Hunt's Blog
T
Tailwind CSS Blog
Latest news
Latest news
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Register - Security
The Register - Security
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Engineering at Meta
Engineering at Meta
SecWiki News
SecWiki News
MyScale Blog
MyScale Blog
GbyAI
GbyAI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
Arctic Wolf
The GitHub Blog
The GitHub Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
有赞技术团队
有赞技术团队
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
雷峰网
雷峰网
P
Privacy International News Feed
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
月光博客
月光博客
V
V2EX
H
Help Net Security
博客园 - 三生石上(FineUI控件)
U
Unit 42
B
Blog
PCI Perspectives
PCI Perspectives
G
GRAHAM CLULEY
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI

博客园 - 无心々菜

高并发 - 配置2 高并发 - 配置 地图 - QGIS加载geojson,并导入Postgis数据库 VUE2 - Geoserver打印矢量PDF地图 - 在VUE2中的应用 地图 - Geoserver打印矢量PDF地图 Docker - 离线+无root环境安装 docker-rootless 运维 - 哪吒监控 Postgres 数据库在docker环境下分布式部署(arm64框架) Postgres 数据库在docker环境下分布式部署 Https - 配置方案 OpenObserver - 系统接口监控 VUE3 - Docker部署 + traefik反代 VUE2 - Docker部署 + traefik反代 高斯DB 数据库的安装 NETCORE - 使用 EFCORE 调用 高斯DB数据库 JMeter - 压力测试 NETCORE - IdentityServer4 多节点部署 NETCORE - IdentityServer4 相关文档 .NET框架 - NETCORE + API + EF(DBFirst) + PostgresSql Docker 部署 APISIX + etcd Docker部署martin 矢量切片服务器 Postgres 数据库的安装 NETCORE - 调用 RUSTFS Docker - 部署 RustFS 对像存储 Docker - 使用 Docker Secrets 敏感数据传输 Docker - 部署 Consul KV 统一管理所有项目的配置 Docker - 部署 HashiCorp Vault 开源密钥管理工具 kong 网关下集成 Consul服务注册与发现 Docker - 部署Consul 新
Docker 部署 kong 网关
无心々菜 · 2025-10-15 · via 博客园 - 无心々菜

Docker 部署 kong 网关

下载镜像

docker pull kong:3.9

 docker-compose.yml

version: '3.8'

services:
  kong:
    image: kong:3.9
    container_name: kong-dbless
    restart: always
    environment:
      KONG_DATABASE: "off"                              # 无数据库模式
      KONG_DECLARATIVE_CONFIG: /usr/local/kong/declarative/kong.yml
      KONG_PROXY_LISTEN: 0.0.0.0:8000                   # 代理入口
      KONG_ADMIN_LISTEN: 0.0.0.0:8001                   # 管理接口
      KONG_ADMIN_GUI_LISTEN: 0.0.0.0:8002               # Kong Manager 界面
      KONG_ADMIN_GUI_URL: http://localhost:8002
      KONG_LOG_LEVEL: info
      KONG_PROXY_ACCESS_LOG: /usr/local/kong/logs/access.log
      KONG_PROXY_ERROR_LOG: /usr/local/kong/logs/error.log

    KONG_DNS_RESOLVER: 10.10.0.98:8600 # 宿主机的 consul udp 端口 8600


    ports:
      - "18000:8000"     # 公网 API 访问
      - "18001:8001"     # Admin API
      - "18002:8002"     # Web 界面(Manager)
    volumes:
      - D:\DockerMapping\Kong\kong.yml:/usr/local/kong/declarative/kong.yml
      - D:\DockerMapping\Kong\logs:/usr/local/kong/logs                         # 日志持久化(可选)
      - D:\DockerMapping\Kong\certs:/etc/kong/certs                             # 证书(可选)

 创建持久化目录

D:\DockerMapping\Kong

 创建文件:D:\DockerMapping\Kong\kong.yml

_format_version: "3.0"
_transform: true

services:
  - name: example_service
    url: https://httpbin.org
    routes:
      - name: example_route
        paths:
          - /demo

image

 启动

docker-compose up -d kong

测试

访问:http://localhost:18001/

image

 访问:http://localhost:18002/

image

end.