Skip to content
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

Add info about mirror pods in FAQ #5566

Closed
vadasambar opened this issue Mar 6, 2023 · 12 comments · Fixed by #5609
Closed

Add info about mirror pods in FAQ #5566

vadasambar opened this issue Mar 6, 2023 · 12 comments · Fixed by #5609
Assignees
Labels
kind/documentation Categorizes issue or PR as related to documentation.

Comments

@vadasambar
Copy link
Member

We use the wording mirror pods in our flags but don't really talk about what they mean anywhere. e.g.,
image
More can be found in the FAQ here
This can be confusing for end users.

@vadasambar vadasambar added the kind/bug Categorizes issue or PR as related to a bug. label Mar 6, 2023
@vadasambar
Copy link
Member Author

/kind documentation

@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label Mar 6, 2023
@vadasambar
Copy link
Member Author

vadasambar commented Mar 6, 2023

kind/bug is not correct here but I am not sure how to remove it yet.

@gregth
Copy link

gregth commented Mar 6, 2023

Maybe a reference to the Kubernetes documentation would help: https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/

@Shubham82
Copy link
Contributor

/remove-kind bug

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Mar 22, 2023
@Shubham82
Copy link
Contributor

Maybe a reference to the Kubernetes documentation would help: https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/

It seems good!
I'm up for it.

@Shubham82
Copy link
Contributor

/assign

@Shubham82
Copy link
Contributor

Fixed it here: #5609

@vadasambar
Copy link
Member Author

@Shubham82 thanks for picking this up. Note that we have some additional TODOs:

From the comment here

  1. add link to official definition of mirror pod OR static pod docs in FAQ wherever mirror pod is mentioned
  2. add link to static pod docs wherever mirror pod is mentioned in the code
  3. add a section around how CA treats mirror/static pods when draining a node

@Shubham82
Copy link
Contributor

Shubham82 commented Mar 22, 2023

Hi @vadasambar, I didn't know about that about your PR that was closed
Thanks for mentioning it here.

add a section around how CA treats mirror/static pods when draining a node

In FAQ, there is mention about Mirror podes while scaling down the node, and its respective flags i.e. skip-nodes-with-system-pods and ignore-mirror-pods-utilization. i guess these flags explain what to do with mirror pods while draining a node.

https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-scale-down-work

add link to official definition of mirror pod OR static pod docs in FAQ wherever mirror pod is mentioned

I will do that.

add link to static pod docs wherever mirror pod is mentioned in the code

I think not everywhere, which you mentioned in the comment here, I suggest mentioning it in the following place:
https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/utils/pod/pod.go#L45

@vadasambar
Copy link
Member Author

In FAQ, there is mention about Mirror podes while scaling down the node

I guess you are talking about

The sum of cpu and memory requests of all pods running on this node (DaemonSet pods and Mirror pods are included by default but this is configurable with --ignore-daemonsets-utilization and --ignore-mirror-pods-utilization flags)

https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-scale-down-work

As a user of CA(cluster-autoscaler), it is hard to understand how CA is going to treat mirror pods during (say) scale-down.

I think not everywhttps://github.com//pull/5565#discussion_r1133471107, which you mentioned in the comment here, I suggest mentioning it in the following place:

I think having it in all those places might be valuable because many of the places I mentioned don't refer to IsMirrorPod function directly. Open to other opinions here.

@Shubham82
Copy link
Contributor

@vadasambar, If someone knows about Mirror Pods, before understanding the code. Mention everywhere I don't think it makes sense. but let's wait for other opinions.

@Shubham82
Copy link
Contributor

cc @MaciekPytel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
4 participants