Skip to content
RU

Port 2379: etcd distributed KV store

Key idea:

Port 2379 (TCP) is the standard for etcd distributed KV store. etcd — distributed key-value store on Raft consensus. Foundation of Kubernetes (stores all cluster state). Port 2379 — client API, 2380 — peer communication. Production etcd

Below: what uses this port, security considerations, online check, FAQ.

Check your host & ports →

What is on this port

etcd distributed KV store

etcd — distributed key-value store on Raft consensus. Foundation of Kubernetes (stores all cluster state). Port 2379 — client API, 2380 — peer communication. Production etcd cluster = 3 or 5 nodes.

Security considerations

etcd without TLS + auth — cluster-wide takeover. Always mTLS for peer + client, role-based access control. Snapshot backups mandatory.

Check this port online

Check port online →

Enterno.io Ping + Port checker tests TCP reachability of any port from our server in Moscow.

Understanding etcd's Role in Distributed Systems

etcd is a distributed key-value (KV) store that provides a reliable way to store data across a cluster. Utilizing the Raft consensus algorithm, etcd ensures that data is replicated consistently across nodes, making it a critical component for distributed systems, particularly in cloud-native environments.

In Kubernetes, etcd serves as the primary data store for all cluster state information. This includes configuration data, service discovery, and metadata about pods and nodes. The choice of Port 2379 for client API communication facilitates interaction with etcd, allowing users to perform operations such as reading, writing, and monitoring the state of their data.

When deploying etcd, it is essential to consider how it integrates with other components of your system. For instance, Kubernetes uses etcd not just for resource management but also for maintaining the desired state of applications. This means that any changes made via the Kubernetes API are reflected in etcd, ensuring that the system's state is always consistent.

Moreover, etcd's ability to provide strong consistency guarantees makes it an ideal choice for scenarios where data integrity is paramount. In environments where multiple nodes may need to coordinate, etcd acts as a centralized source of truth, allowing for seamless communication and data sharing.

Security Best Practices for Using Port 2379

Securing etcd is crucial, especially when exposing it over Port 2379. Here are key security practices to follow:

  • Enable TLS Encryption: Always use Transport Layer Security (TLS) to encrypt data in transit. This protects against eavesdropping and man-in-the-middle attacks.
  • Authentication and Authorization: Implement client authentication using certificates and enforce strict access controls. Utilize role-based access control (RBAC) to define what actions each user or service account can perform.
  • Network Policies: Limit access to etcd by configuring firewall rules and network policies to restrict which IP addresses can connect to Port 2379.
  • Regular Backups: Schedule regular backups of your etcd data to ensure you can recover in the event of data loss or corruption.
  • Audit Logging: Enable audit logging to keep track of all access and modifications to your etcd data. This can help identify unauthorized access attempts and track changes over time.

By following these best practices, you can significantly reduce the risk associated with exposing etcd's API over Port 2379 and enhance the overall security of your distributed system.

Practical Commands for Managing etcd on Port 2379

Interacting with etcd via Port 2379 can be accomplished using various command-line tools and API calls. Here are some practical examples:

  • Setting a Key: To store a key-value pair in etcd, use the following command:
etcdctl put my_key "my_value"
  • Getting a Key: To retrieve the value associated with a specific key:
etcdctl get my_key
  • Listing All Keys: To list all keys stored in etcd:
etcdctl get '' --prefix
  • Deleting a Key: To remove a specific key:
etcdctl del my_key
  • Watch for Changes: To watch for changes to a key:
etcdctl watch my_key

These commands can be executed directly against the etcd API running on Port 2379. Ensure that you have the proper permissions and that your etcd instance is secured according to best practices.

Additionally, you can utilize the etcd HTTP API for more advanced operations. For example, to set a key using the API:

curl -X PUT https://:2379/v2/keys/my_key -d value=my_value --cacert /path/to/ca.pem --cert /path/to/cert.pem --key /path/to/key.pem

These examples provide a solid foundation for managing your etcd instance and leveraging its capabilities effectively.

Learn more

Sources

Frequently Asked Questions

Is port 2379 open by default?

No, modern cloud providers (AWS, Google Cloud, Yandex) close all incoming ports by default. You must explicitly allow port 2379 in a Security Group or firewall.

How to check if my port 2379 is reachable?

Use Enterno Ping + Port Checker. Or in shell: nc -vz example.com 2379 or telnet example.com 2379.

Is port 2379 safe to expose?

Depends on the service. etcd distributed KV store should never be exposed publicly without authentication + TLS. See our 2026 exposure research.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.