Kubernetes¶
Delete empty replicas set¶
Delete all empty replicas set in the current namespace.
Test a deployed app on local¶
When your app is deployed on Kubernetes thanks to a deployment and a service and you want to test it without expose it to Internet, you can use this:
Perform Kubernetes port forwarding:
Where:
80: is thesvc/personal-website-v2port2040: is the port of the remote host (only accessible in localhost)
To access form your browser in your computer on a remote machine:
Where:
ovh-vps: is the preconfigured ssh host where the Kubernetes app run-N: "No command", ssh won't open a TTY on the remote host-L: "Local port forwarding", to perform port forwarding7070: is the local port on your machine8080: is the port of the remote host that we open previously (only accessible in localhost so we tunneled it thanks to ssh)
With this solution, no port will be open the Kubernetes server.
k3s¶
Remove unused images¶
To delete from disk all images not currently used by a pod.