Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pd

> 编程语言
Open source

Placement driver for TiKV

1.2K stars0 likes1 views
WebsiteGitHub

About

Placement driver for TiKV

PD

PD is the abbreviation for Placement Driver. It manages and schedules TiKV clusters.

PD supports fault-tolerance by embedding etcd.

If you're interested in contributing to PD, see CONTRIBUTING.md. For more contributing information about where to start, click on the contributor icon above.

Build

  1. Make sure Go (version 1.25 or later) is installed.
  2. Run make (equivalent to make build) to build PD. pd-server, pd-ctl, and pd-recover will be produced in the bin directory.

Usage

PD can be configured using command-line flags. For more information, see PD Configuration Flags.

Single node with default ports

You can run pd-server directly on your local machine. If you want to connect to PD from outside, you can let PD listen on the host IP.

bash
# Set HOST_IP to the address you want to listen on
export HOST_IP="192.168.199.105"

pd-server --name="pd" \
          --data-dir="pd" \
          --client-urls="http://${HOST_IP}:2379" \
          --peer-urls="http://${HOST_IP}:2380" \
          --log-file=pd.log

Using curl to view PD members:

…

You can also use httpie to call the API:

…

Docker

You can choose one of the following methods to get a PD image:

  • Build locally:

    bash
    docker build -t pingcap/pd .
  • Pull from Docker Hub:

    bash
    docker pull pingcap/pd

Then you can run a single node using the following command:

bash
# Set HOST_IP to the address you want to listen on
export HOST_IP="192.168.199.105"

docker run -d -p 2379:2379 -p 2380:2380 --name pd pingcap/pd \
          --name="pd" \
          --data-dir="pd" \
          --client-urls="http://0.0.0.0:2379" \
          --advertise-client-urls="http://${HOST_IP}:2379" \
          --peer-urls="http://0.0.0.0:2380" \
          --advertise-peer-urls="http://${HOST_IP}:2380" \
          --log-file=pd.log

Cluster

As a component of the TiKV project, PD needs to run with TiKV to work. The cluster can also include TiDB to provide SQL services. For detailed instructions to deploy a cluster, refer to Deploy a TiDB Cluster Using TiUP or TiDB on Kubernetes Documentation.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gohacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言