コンテンツにスキップ
Kong Logo | Kong Docs Logo
  • ドキュメント
    • API仕様を確認する
      View all API Specs すべてのAPI仕様を表示 View all API Specs arrow image
    • ドキュメンテーション
      API Specs
      Kong Gateway
      軽量、高速、柔軟なクラウドネイティブAPIゲートウェイ
      Kong Konnect
      SaaSのエンドツーエンド接続のための単一プラットフォーム
      Kong AI Gateway
      GenAI インフラストラクチャ向けマルチ LLM AI Gateway
      Kong Mesh
      Kuma と Envoy をベースにしたエンタープライズサービスメッシュ
      decK
      Kongの構成を宣言型で管理する上で役立ちます
      Kong Ingress Controller
      Kubernetesクラスタ内で動作し、Kongをプロキシトラフィックに設定する
      Kong Gateway Operator
      YAMLマニフェストを使用してKubernetes上のKongデプロイメントを管理する
      Insomnia
      コラボレーティブAPI開発プラットフォーム
  • Plugin Hub
    • Plugin Hubを探索する
      View all plugins すべてのプラグインを表示 View all plugins arrow image
    • 機能性 すべて表示 View all arrow image
      すべてのプラグインを表示
      AI's icon
      AI
      マルチ LLM AI Gatewayプラグインを使用してAIトラフィックを管理、保護、制御する
      認証's icon
      認証
      認証レイヤーでサービスを保護する
      セキュリティ's icon
      セキュリティ
      追加のセキュリティレイヤーでサービスを保護する
      トラフィック制御's icon
      トラフィック制御
      インバウンドおよびアウトバウンドAPIトラフィックの管理、スロットル、制限
      サーバーレス's icon
      サーバーレス
      他のプラグインと組み合わせてサーバーレス関数を呼び出します
      分析と監視's icon
      分析と監視
      APIとマイクロサービストラフィックを視覚化、検査、監視
      変革's icon
      変革
      Kongでリクエストとレスポンスをその場で変換
      ログ記録's icon
      ログ記録
      インフラストラクチャに最適なトランスポートを使用して、リクエストと応答データをログに記録します
  • サポート
  • コミュニティ
  • Kongアカデミー
デモを見る 無料トライアルを開始
Kong Konnect
  • Home icon
  • Kong Konnect
  • Gateway Manager
  • Plugins
  • Adding custom plugins in Konnect
report-issue問題を報告する
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • ドキュメント投稿ガイドライン
  • Introduction
    • Overview of Konnect
    • Architecture
    • Network Resiliency and Availability
    • Port and Network Requirements
    • Private Connections to Other Cloud Providers
      • Create a private connection with AWS PrivateLink
    • Geographic Regions
    • Centralized consumer management
    • Compatibility
    • Stages of Software Availability
    • Release Notes
    • Support
      • Control Plane Upgrades FAQ
      • Supported Installation Options
  • Get Started
    • Overview
    • Add your API
    • Migrating a Self-Managed Kong Gateway into Konnect
  • Gateway Manager
    • Overview
    • Dedicated Cloud Gateways
      • Overview
      • Provision a Dedicated Cloud Gateway
      • Securing Backend Traffic
      • Transit Gateways
      • Azure VNET Peering
      • Custom Domains
      • Custom Plugins
      • Data plane logs
    • Serverless Gateways
      • Overview
      • Provision a serverless Gateway
      • Securing Backend Traffic
      • Custom Domains
    • Data Plane Nodes
      • Installation Options
      • Upgrade a Data Plane Node
      • Verify a Data Plane Node
      • Secure Control Plane/Data Plane Communications
      • Renew Data Plane Certificates
      • Parameter Reference
      • Using Custom DP Labels
    • Control Plane Groups
      • Overview
      • Working with Control Plane Groups
      • Migrate Configuration into Control Plane Groups
      • Conflicts in Control Planes
    • Kong Gateway Configuration in Konnect
      • Overview
      • Manage Plugins
        • Overview
        • Adding Custom Plugins
        • Updating Custom Plugins
        • How to Create Custom Plugins
      • Create Consumer Groups
      • Secrets Management
        • Overview
        • Konnect Config Store
        • Set Up and Use a Vault in Konnect
      • Manage Control Plane Configuration with decK
    • Active Tracing
      • Overview
    • KIC Association
    • Backup and Restore
    • Version Compatibility
    • Troubleshooting
  • Mesh Manager
    • Overview
    • Create a mesh with the Kubernetes demo app
    • Federate a zone control plane to Konnect
    • Migrate a self-managed zone control plane to Konnect
  • Service Catalog
    • Overview
    • Integrations
      • Overview
      • Datadog
      • GitHub
      • GitLab
      • PagerDuty
      • SwaggerHub
      • Traceable
      • Slack
    • Scorecards
  • API Products
    • Overview
    • Product Documentation
    • Productize a Service
  • Dev Portal
    • Overview
    • Dev Portal Configuration Preparation
    • Create a Dev Portal
    • Sign Up for a Dev Portal Account
    • Publish an API to Dev Portal
    • Access and Approval
      • Manage Developer Access
      • Manage Developer Team Access
      • Add Developer Teams from IdPs
      • Manage Application Registrations
      • Configure generic SSO for Dev Portal
      • Configure Okta SSO for Dev Portal
    • Application Lifecycle
    • Register and create an application as a developer
    • Enable and Disable App Registration for API Product Versions
    • Dynamic Client Registration
      • Overview
      • Okta
      • Curity
      • Auth0
      • Azure
      • Custom IdP
    • Portal Management API Automation Guide
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Portal Customization
      • Overview
      • About Self-Hosted Dev Portal
      • Host your Dev Portal with Netlify
      • Custom Domains
    • Dev Portal SDK
    • Troubleshoot
  • Advanced Analytics
    • Overview
    • Dashboard
    • Explorer
    • Analyze API Usage and Performance with Reports
    • Requests
  • Org Management
    • Plans and Billing
    • Authentication and Authorization
      • Overview
      • Teams
        • Overview
        • Manage Teams
        • Teams Reference
        • Roles Reference
      • Manage Users
      • Manage System Accounts
      • Personal Access Tokens
      • Social Identity Login
      • Org Switcher
      • Configure Generic SSO
      • Configure Okta SSO
      • Login Sessions Reference
      • Troubleshoot
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Account and Org Deactivation
  • API
    • Overview
    • API Request API (Beta)
      • API Spec
    • API Products API
      • API Spec
    • Audit Logs API
      • API Spec
      • Audit Log Webhooks
    • Control Plane API
      • API Spec
    • Control Plane Configuration API
      • API Spec
    • Cloud Gateways API
      • API Spec
    • Identity API
      • API Spec
      • Identity Integration Guide
      • SSO Customization
    • Konnect Search API (Beta)
      • API Spec
    • Mesh Manager API
      • API Spec
      • Kong Mesh API Reference
    • Portal Client API
      • API Spec
    • Portal Management API
      • API Spec
    • Reference
      • Filtering
      • API Errors
  • Reference
    • Labels
    • Plugin Ordering Reference
    • Konnect Search
    • Terraform Provider
    • Audit Logs
    • Verify audit log signatures
    • IdP SAML attribute mapping
enterprise-switcher-icon 次に切り替える: OSS
On this pageOn this page
  • Prerequisites
  • Add a custom plugin to a control plane
  • Upload files to data plane nodes
  • More information

このページは、まだ日本語ではご利用いただけません。翻訳中です。

Adding custom plugins in Konnect

You can manage schemas for custom plugins via the Konnect UI or the Konnect Control Planes Config API.

After uploading a schema to Konnect, upload your custom plugin to each data plane node, then Konnect can manage the configuration for your plugin like any other Kong entity.

If you need to update a schema for a plugin that was already uploaded to Konnect, there are a few considerations based on the type of update. See Editing or deleting a custom plugin’s schema for more information.

Note: For adding custom plugins to a Dedicated Cloud Gateway, see Custom plugins in Dedicated Cloud Gateways.

Prerequisites

  • Your custom plugin meets Konnect’s requirements for Konnect.

  • The schema file must be in Lua, even if the custom plugin is written in another supported language. For help with developing plugins, see the plugin development resources.

    If you have a custom plugin written in a language other than Lua, convert the schema into a schema.lua file before uploading it to Konnect.

  • When using the /plugin-schemas API, authenticate your requests with either a personal access token or a system account token by including it in the authentication header:

      --header 'Authorization: Bearer kpat_xgfT'
    

Add a custom plugin to a control plane

Konnect only requires the custom plugin’s schema.lua file. Using that file, it creates a plugin entry in the plugin catalog for your control plane.

Upload a custom plugin schema to create a configurable entity in Konnect:

Konnect UI
Konnect API

Note: The UI is not available when using KIC in Konnect. Please use the Konnect API instead.

  1. From the Gateway Manager, open a control plane.
  2. Open Plugins from the side navigation, then click Add Plugin.
  3. Open the Custom Plugins tab, then click Create on the Custom Plugin tile.
  4. Upload the schema.lua file for your plugin.
  5. Check that your file displays correctly in the preview, then click Save.

Upload the schema.lua file for your plugin using the /plugin-schemas endpoint:

curl -i -X POST \
  https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/plugin-schemas \
  --header 'Content-Type: application/json' \
  --data "{\"lua_schema\": <your escaped Lua schema>}"

Tip: You can use jq to pass your schema directly from the file instead of manually escaping it:

--data "{\"lua_schema\": $(jq -Rs '.' < REPLACE-PATH-TO-SCHEMA-FILE)}"

You should get an HTTP 201 response.

You can check that your schema was uploaded using the following request:

curl -i -X GET \
  https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/plugin-schemas

This request returns an HTTP 200 response with the schema for your plugin as a JSON object.

Uploading a custom plugin schema adds the plugin to a specific control plane. If you need it to be available in multiple control planes, add the schema individually to each one.

Upload files to data plane nodes

After uploading a schema to Konnect, upload the schema.lua and handler.lua for your plugin to each Kong Gateway data plane node.

If a data plane node doesn’t have these files, the plugin won’t be able to run on that node.

Konnect does not support plugins with api.lua, daos.lua, or migration.lua.

Universal
Docker

Follow the Kong Gateway plugin deployment and installation instructions to get your plugin set up on each node.

If you are running Kong Gateway on Docker, the plugin needs to be installed inside the Kong Gateway container for each node. Copy or mount the plugin’s source code into the container.

Let’s consider this sample custom plugin. This is composed of a schema.lua and a handler.lua file. On your filesystem, let’s create a similar path structure to the following:

.
└── kong
    └── plugins
        └── example-plugin
            ├── handler.lua
            └── schema.lua

You can do this in one of two ways: mounting the files with docker run, or using a Dockerfile.

To mount and enable this custom plugin on a data plane node:

  1. In your control plane, go to Data Plane Nodes, then click New Data Plane Node.
  2. Choose Linux (Docker) and Generate a certificate.
  3. Copy the generated docker run command and add the following snippet to it:

     -v "/tmp/plugins/kong:/tmp/custom_plugins/kong" \
     -e "KONG_PLUGINS=bundled,example-plugin" \
     -e "KONG_LUA_PACKAGE_PATH=/tmp/custom_plugins/?.lua;;" \
    

    Substitute your own source and target paths, as well as the plugin name.

    A sample quickstart command would look something like this:

     docker run -d \
       -v "/tmp/plugins/kong:/tmp/custom_plugins/kong" \
       -e  "KONG_PLUGINS=bundled,example-plugin" \
       -e "KONG_LUA_PACKAGE_PATH=/tmp/custom_plugins/?.lua;;" \
       -e "KONG_ROLE=data_plane" \
       -e "KONG_DATABASE=off" \
       -e "KONG_VITALS=off" \
       -e "KONG_NGINX_WORKER_PROCESSES=1" \
       -e "KONG_CLUSTER_MTLS=pki" \
       -e "KONG_CLUSTER_CONTROL_PLANE=<example>.cp0.konghq.com:443" \
       -e "KONG_CLUSTER_SERVER_NAME=<example>.cp0.konghq.com" \
       -e "KONG_CLUSTER_TELEMETRY_ENDPOINT=<example>.tp0.konghq.com:443" \
       -e "KONG_CLUSTER_TELEMETRY_SERVER_NAME=<example>.tp0.konghq.com" \
       -e "KONG_CLUSTER_CERT=<cert>" \
       -e "KONG_CLUSTER_CERT_KEY=<key>" \
       -e "KONG_LUA_SSL_TRUSTED_CERTIFICATE=system" \
       -e "KONG_KONNECT_MODE=on" \
       -p 8000:8000 \
       -p 8443:8443 \
       kong/kong-gateway:<version>
    
  4. Run the command to start a data plane node with your custom plugin loaded in.

To copy the plugin using a Dockerfile instead, see the Kong Gateway custom plugin docs.

You can now configure this custom plugin like any other plugin in Konnect.

Caution: Carefully test the operation of any custom plugins before using them in production. Kong is not responsible for the operation or support of any custom plugins, including any performance impacts on your Konnect or Kong Gateway deployments.

More information

  • Edit or delete custom plugins in Konnect
  • Custom plugins in Dedicated Cloud Gateways
  • Custom plugin schema endpoints (Control Plane Config API)
  • Custom plugin template
  • Plugin development guide
  • PDK reference
Thank you for your feedback.
Was this page useful?
情報が多すぎる場合 close cta icon
Kong Konnectを使用すると、より多くの機能とより少ないインフラストラクチャを実現できます。月額1Mリクエストが無料。
無料でお試しください
  • Kong
    APIの世界を動かす

    APIマネジメント、サービスメッシュ、イングレスコントローラーの統合プラットフォームにより、開発者の生産性、セキュリティ、パフォーマンスを大幅に向上します。

    • 製品
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • 製品アップデート
      • 始める
    • ドキュメンテーション
      • Kong Konnectドキュメント
      • Kong Gatewayドキュメント
      • Kong Meshドキュメント
      • Kong Insomniaドキュメント
      • Kong Konnect Plugin Hub
    • オープンソース
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kongコミュニティ
    • 会社概要
      • Kongについて
      • お客様
      • キャリア
      • プレス
      • イベント
      • お問い合わせ
  • 利用規約• プライバシー• 信頼とコンプライアンス
© Kong Inc. 2025