Kubernetes tips
This commit is contained in:
18
src/notes/9-kubernetes-tips/note.md
Normal file
18
src/notes/9-kubernetes-tips/note.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Kubernetes tricks
|
||||
|
||||
A collection of nice to haves while managing applications in kubernetes.
|
||||
|
||||
## Kubectl proxy
|
||||
|
||||
Running `kubectl proxy` will open a tunnel to the selected cluster. You can then access the webapi on the port that was displayed.
|
||||
|
||||
Using that webapi you can browse the resources and even access the application hosted within your cluster.
|
||||
|
||||
### Explore a namespace
|
||||
Enter the following address and replace the namespace name and the resource type (pods|services) to get a list of the available resources.
|
||||
`http://localhost:8001/api/v1/namespaces/<namespace-name>/<resource-type>`
|
||||
|
||||
### Make a request to a service or pod
|
||||
The url pattern looks like this: `http://localhost:8001/api/v1/namespaces/<namespace-name>/<pods|services>/<protocol>:<name>:<port>/proxy/<url-path>`
|
||||
Example: `http://localhost:8001/api/v1/namespaces/hangfire-services/services/http:hangfire-services:80/proxy/hangfire` will make a request to my hangfire dashboard.
|
||||
|
||||
Reference in New Issue
Block a user