New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How do you find out what a pod belongs to (Rep. Controller, Deployment, Replica Set, etc.? #32051
Comments
@jason-riddle I think you could check the created-by annotation of pod. |
@adohe But that's assuming it was set in the first place which I didn't do. However, your suggestion lead to the following. With the describe call, you can just grep for kubectl describe pods dd-agent-4qwo1 | grep Controllers
# Controllers: DaemonSet/dd-agent In the case of a lone pod running, kubectl describe pods apache | grep Controllers
# Controllers: <none> Thanks! |
Worked for me:
|
Grep'ing $ kubenetes version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.15", GitCommit:"73dd5c840662bb066a146d0871216333181f4b64", GitTreeState:"clean", BuildDate:"2021-01-13T13:22:41Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.12-gke.1206", GitCommit:"4ad64c148c8fa54132c0730a4838c7b5e4e1b342", GitTreeState:"clean", BuildDate:"2021-01-25T20:33:15Z", GoVersion:"go1.13.15b4", Compiler:"gc", Platform:"linux/amd64"} |
using jsonpath can help too, if you want to check for more than 1:
|
So the question is how to determine the "Deployment"? |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): No
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): It's a bit tough to search for this since this includes a lot of keywords.
Is this a BUG REPORT or FEATURE REQUEST? (choose one): Question
Pretty much what the title says. I'm asking because sometimes I want to kill a pod for good but I don't remember what I used to create it.
The text was updated successfully, but these errors were encountered: