@@ -33,9 +33,13 @@ The following compatible plugins are available:
3333kubectl curl [options] URL [container] 
3434``` 
3535
36- *  In the URL, the host part must be the name of the pod to send the request to.
37- *  If no port number is specified, the request will be sent to a ` http `  port.
38- *  If there are multiple containers with a ` http `  port, the name of the container
36+ *  In the ` URL ` , the host part can be:
37+  *  ** podName** : pod to send the request to
38+  *  a resource reference, such as ** deployment/deploymentName** . The request is sent to a random pod from this resource.
39+  *  NOTE: supported resources: ** deployment** , ** statefulset** , ** daemonset** 
40+  *  NOTE: supported abbreviations: ** deploy** , ** sts** , ** ds** 
41+ *  If no port number is specified, the request will be sent to an ` http `  port.
42+ *  If there are multiple containers with an ` http `  port, the name of the container
3943 to send to the request to must be specified after the URL.
4044
4145## Examples  
@@ -45,15 +49,32 @@ This section records common use cases for this kubectl plugin.
4549### Collecting profiles of Go programs  
4650
4751``` 
48- $ kubectl curl "http://{pod }/debug/pprof/profile?debug=1&seconds=10" > ./profile 
52+ $ kubectl curl "http://{podname }/debug/pprof/profile?debug=1&seconds=10" > ./profile 
4953$ go tool pprof -http :6060 ./profile 
5054``` 
5155
5256*  Full documentation: [ net/http/pprof] ( https://pkg.go.dev/net/http/pprof ) 
5357
5458### Retrieving prometheus metrics  
5559
60+ All of these variants work:
61+ 5662``` 
57- $ kubectl curl http://{pod}/metrics 
63+ $ kubectl curl http://{podname}/metrics 
64+ ... 
65+ 
66+ $ kubectl curl http://daemonset/{daemonsetname}/metrics 
67+ ... 
68+ 
69+ $ kubectl curl http://ds/{daemonsetname}/metrics 
70+ ... 
71+ 
72+ $ kubectl curl {podname}/metrics 
73+ ... 
74+ 
75+ $ kubectl curl daemonset/{daemonsetname}/metrics 
76+ ... 
77+ 
78+ $ kubectl curl ds/{daemonsetname}/metrics 
5879... 
5980``` 
0 commit comments