mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
Added script to find all pods not managed by Cilium
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright Authors of Cilium
|
||||
|
||||
function all_ceps { kubectl get cep --all-namespaces -o json | jq -r '.items[].metadata | .namespace + "/" + .name'; }
|
||||
function all_pods { kubectl get pods --all-namespaces -o json | jq -r '.items[] | select((.status.phase=="Running" or .status.phase=="Pending") and (.spec.hostNetwork==true | not)) | .metadata | .namespace + "/" + .name'; }
|
||||
|
||||
echo "Skipping pods with host networking enabled or with status not in Running or Pending phase..."
|
||||
|
||||
sort <(all_ceps) <(all_pods) | uniq -u
|
||||
Reference in New Issue
Block a user