Difference between revisions of "K8"
(→Auf Container verbinden) |
(→kubectl) |
||
Line 20: | Line 20: | ||
<pre> | <pre> | ||
kubectl exec -it <pod-name> -- /bin/sh | kubectl exec -it <pod-name> -- /bin/sh | ||
+ | </pre> | ||
+ | |||
+ | === Reverse Proxy zu einem pod erstellen === | ||
+ | <pre> | ||
+ | kubectl port-forward <podname> 8000:80 | ||
</pre> | </pre> | ||
Revision as of 10:33, 26 June 2021
Kubernetes
Contents
kubectl
Nützliche kubectl Kommandos
Default namespace setzen
kubectl config set-context minikube --namespace=mynamespace
Netzwerk image aufstarten mit bash
kubectl run my-shell --rm -it --image amouat/network-utils -- bash
https://hub.docker.com/r/amouat/network-utils/
Auf Container verbinden
kubectl exec -it <pod-name> -- /bin/sh
Reverse Proxy zu einem pod erstellen
kubectl port-forward <podname> 8000:80