Common attacks and weaknesses
- Without client certificate authentication, every Kubernetes secret can be read.
etcd client API, the key-value store holding the whole Kubernetes cluster state (including secrets).
Commands sent to port 2379 create and control containers or cluster resources on the host. Encryption is optional: traffic is only protected if TLS is enabled on the server and the client.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| etcd-client | 2379 | TCP | etcd client communication | - | 2014-07-09 |
| - | 2379 | - | Reserved | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :2379' # process listening on 2379
sudo lsof -nP -i :2379macOS
sudo lsof -nP -i :2379
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 2379 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 2379 netstat -ano | findstr :2379
From another machine
nmap -p 2379 -sV <host> nc -zv <host> 2379
Block it in the firewall
sudo ufw deny 2379/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 2379" -Direction Inbound -LocalPort 2379 -Protocol TCP -Action Block # Windows
etcd client API, the key-value store holding the whole Kubernetes cluster state (including secrets).
Port 2379 is registered for TCP.
It is rated 9/10 (critical) when exposed to the Internet. Without client certificate authentication, every Kubernetes secret can be read. Require mutual TLS and restrict to control-plane nodes.
On Linux run "ss -ltnup 'sport = :2379'", on macOS "lsof -nP -i :2379", and on Windows "netstat -ano | findstr :2379" to see the local process. From another machine, "nmap -p 2379 <host>" shows whether it is reachable.