---
# System prepended metadata

title: k8s

---

# k8s
## debug
- 在cluster 內開一個linux alphine pod 來connect
```shell=
kubectl run -i --tty alpine --image=alpine --restart=Never -- sh
apk add --no-cache curl
```

request by dns
```
curl http://gogo.default.svc.cluster.local./echo
```

service DNS record in k8s
```
{{service name}}.{{k8s namespace}}.svc.cluster.local.
```
- k8s dns reference
    - https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/


minikube run docker
```shell=
eval $(minikube docker-env)
```
