コンテンツにスキップ
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アカデミー
デモを見る 無料トライアルを開始
decK
  • Home icon
  • decK
  • Get Started with decK
report-issue問題を報告する
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • ドキュメント投稿ガイドライン
  • Introduction
    • Overview
    • Configuration Options
    • Support Policy
    • Security Policy
  • Changelog
  • Installation
    • Overview
    • Binary
    • Docker
    • GitHub Actions
  • Get Started
  • Managing Kong Gateway
    • Overview
    • Konnect Configuration
    • Configure Authentication
    • Ping
    • Backup
    • Diff
    • Sync
    • Apply
    • Reset
    • Validate
    • RBAC
    • Workspaces
    • Tags
    • De-duplicate Plugin Configuration
    • Object Defaults
    • Sensitive Data
  • decK Files
    • Overview
    • Config Generation
      • openapi2kong
      • kong2kic
      • kong2tf
    • Linting
    • File Manipulation
      • Overview
      • Update Values
      • Plugins
      • Tags
      • Namespace
    • Combining Files
      • Merge
      • Render
    • Validate
    • Convert
  • APIOps
    • Overview
    • Continuous Integration
    • Federated Config
  • Reference
    • Entities
    • FAQ
    • Gateway 3.0 Upgrade
    • Environment Variables
enterprise-switcher-icon 次に切り替える: OSS
On this pageOn this page
  • Prerequisites
    • Run Kong Gateway
    • Install decK
  • Create a Service
  • Create a Route
  • Add rate limiting
  • Add authentication
  • See your decK file

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

Get Started with decK

This page teaches you how to use decK to create a service, route, plugins, and consumers. It uses the deck gateway apply command to build the configuration up incrementally. At any point, you can run deck gateway dump to see the entire configuration of Kong Gateway at once.

Prerequisites

Before working through this guide, ensure that you have Kong Gateway running and decK installed.

Run Kong Gateway

The quickest way to run Kong Gateway is using the quickstart script:

curl -Ls https://get.konghq.com/quickstart | bash

Install decK

To complete this guide, you’ll need decK v1.43.0 or above installed.

If you don’t have decK installed, copy the following line in to your terminal to run decK using Docker for the purposes of this guide:

alias deck='docker run --rm -v .:/files -w /files -e DECK_KONG_ADDR=http://host.docker.internal:8001 kong/deck'

Create a Service

You can use decK to configure a Service by providing a name and a url. Any requests made to this Service will be proxied to http://httpbin.konghq.com:

echo '_format_version: "3.0"
services:
 - name: example-service
   url: http://httpbin.konghq.com' | deck gateway apply

Create a Route

To access this Service, you need to configure a Route. Create a Route that matches incoming requests that start with /, and attach it to the service that was previously created by specifying service.name:

echo '_format_version: "3.0"
routes:
  - name: example-route
    service: 
      name: example-service
    paths:
      - "/"' | deck gateway apply

You can now make a HTTP request to your running Kong Gateway instance and see it proxied to httpbin:

curl http://localhost:8000/anything

Add rate limiting

At this point, Kong Gateway is a transparent layer that proxies requests to the upstream httpbin instance. Let’s add the Rate Limiting plugin to make sure that people only make five requests per minute:

echo '_format_version: "3.0"
plugins:
  - name: rate-limiting
    service: example-service
    config:
      minute: 5
      limit_by: consumer
      policy: local' | deck gateway apply

To see this in action, make six requests in rapid succession by pasting the following in to your terminal:

for _ in {1..6}; do 
  curl http://localhost:8000/anything
done

Add authentication

You may have noticed that the rate limiting plugin used the limit_by: consumer configuration option. This means that each uniquely identified consumer is allowed 5 requests per minute.

To identify a consumer, let’s add the Key Auth plugin and create a test user named alice:

echo '_format_version: "3.0"
plugins:
  - name: key-auth
    service: example-service
consumers:
  - username: alice
    keyauth_credentials:
      - key: hello_world' | deck gateway apply

After applying the key-auth plugin, you need to provide the apikey header to authenticate your request:

curl http://localhost:8000/anything -H 'apikey: hello_world'

If you make a request without the authentication header, you will see a No API key found in request message.

See your decK file

This page provided each configuration snippet separately to focus on what each snippet provides. For production usage, you should apply the whole configuration each time.

To export the complete configuration, run deck gateway dump -o kong.yaml, then open kong.yaml in your favorite editor.

Try changing Alice’s authentication key to test and then run deck gateway sync kong.yaml to sync the entire configuration. You’ll see the following output:

creating key-auth test for consumer alice
deleting key-auth world for consumer alice
Summary:
  Created: 1
  Updated: 0
  Deleted: 1

Congratulations! You just went from zero to a configured Kong Gateway using decK in no time at all.

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