Aaron Longchamps on Nostr: I'm curious if kubectl has a good way to wait for all pods to become ready when ...
I'm curious if kubectl has a good way to wait for all pods to become ready when applying a yaml file via the command line.
For example, I'm using kubectl apply -f metallb.yaml to setup MetalLB for my load balancer. This spins up 1 controller pod and 5 speakers which take a little bit of time to initialize.
I could put sleep statements in to Ansible, but I'd rather Kubernetes tell me when it's ready.
#homelab #kubernetes
Published at
2024-06-17 17:46:33Event JSON
{
"id": "083093abceb247b160aec1407c5854553a529bfdd769e8503f8af8e8a4130545",
"pubkey": "7d16c714192109c4d11ab20e6ec0e05e47e2dc967774c020c7263f24354138a1",
"created_at": 1718646393,
"kind": 1,
"tags": [
[
"proxy",
"https://infosec.exchange/@heatsink/112633210022172181",
"web"
],
[
"t",
"kubernetes"
],
[
"t",
"homelab"
],
[
"proxy",
"https://infosec.exchange/users/heatsink/statuses/112633210022172181",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://infosec.exchange/users/heatsink/statuses/112633210022172181",
"pink.momostr"
]
],
"content": "I'm curious if kubectl has a good way to wait for all pods to become ready when applying a yaml file via the command line.\n\nFor example, I'm using kubectl apply -f metallb.yaml to setup MetalLB for my load balancer. This spins up 1 controller pod and 5 speakers which take a little bit of time to initialize.\n\nI could put sleep statements in to Ansible, but I'd rather Kubernetes tell me when it's ready.\n\n#homelab #kubernetes",
"sig": "a3ed6814553d0478acd18b2113bb2b8112fa13ed40656a07ccadf2a51b677a70a1bf644b9ce52e0f271163759bfc437de12795e41a64cea660be75052d25751c"
}