---
# System prepended metadata

title: Kubernetes SRD

---

# Kubernetes SRD

Trouble shooting tips

[kubernetes.io](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster/)

[RedHat](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/getting_started_with_kubernetes/troubleshooting_kubernetes)


## Common Commands

```bash
kubectl cluster-info dump

journalctl -l -u kubelet
journalctl -l -u kube-apiserver
```

## etcd

You'll need to install etcdctl. Also note, ls is depreciated.

[Reference](https://lzone.de/cheat-sheet/etcd)

```bash=
ETCDCTL_API=3 ./bin/etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt   \
   --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key \
   get / --prefix --keys-only

ETCDCTL_API=3 ./bin/etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt    \
     --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key \
      get / --prefix | strings

ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt \
     --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key \
     snapshot save 

```

```bash
# ps aux|grep etcd
strace -p 6244 -f -cw
```

![](https://hackmd.io/_uploads/B1qfGqtPd.png)
