// IPSonic MONITORING TOOLKIT / DOCUMENTATION
ipsonic-probe rainbow unicorn

ipsonic-probe ✦

YAML-driven infrastructure validation. Platform-agnostic checks. Zero cloud dependencies.

DNSTCPHTTP / TLSYAML CONFIGCLI FIRSTKISSOFFLINE READY

Part of the ipsonic project ↗ Visit the main website

Kubernetes operator examples

ipsonic-probe provides black-box checks for Kubernetes services. It does not replace kubelet, kubectl, Prometheus, or the Kubernetes API, and it does not require a Kubernetes Python SDK or kubectl.

Where to execute checks

Examples

YAMLWhat it testsImportant limitation
186API server /readyzA successful HTTP response is not full cluster health
187API server /livezLiveness only
188API server /versionRequires authorization to the non-resource URL; expected major version is illustrative
189External Ingress /healthzApplication-level status only
190Internal ClusterIP /healthRequires in-cluster networking
191Headless Service DNS ARecord presence, not all EndpointSlices
192CoreDNS service DNS ADNS resolution, not CoreDNS internals
193Ingress TLS fingerprintFingerprint evidence can change during legitimate renewal
194Metrics Server TCPTCP connectivity only
195Node exporter HTTP /metricsHTTP status only, not Prometheus metric evaluation
196GitOps controller healthAdapt endpoint to controller/version
197External application DNS ADNS record check, not external-dns controller status

Kubernetes API credentials

The Kubernetes API server usually requires a Bearer ServiceAccount token and trust in the cluster CA. The examples use auth.token_env and tls.ca_file_env, never embedded secrets.

A dedicated ServiceAccount can be configured with minimal RBAC for non-resource URLs. Verify the actual authorization requirements in your cluster; avoid cluster-admin. Example manifest: integrations/kubernetes/ipsonic-serviceaccount.yaml.

For a short-lived interactive test inside a pod with an automounted ServiceAccount token:

export IPSONIC_K8S_TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
export IPSONIC_K8S_CA_FILE=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
python3 ipsonic-probe.py --validate --strict examples/186-k8s-apiserver-readyz.yaml
python3 ipsonic-probe.py examples/186-k8s-apiserver-readyz.yaml --output nagios
unset IPSONIC_K8S_TOKEN

Security: Environment variables can be visible to privileged processes and inherited by child processes. Do not print tokens, use set -x, or pass tokens on the command line. Prefer dedicated short-lived ServiceAccount credentials, restrictive RBAC, secure process isolation, and secret injection by your orchestration system. ServiceAccount tokens mounted in pods may rotate: reread them for each execution. Do not place tokens in Git, YAML examples, logs, or baseline files.

For external AWX jobs, do not assume an in-cluster ServiceAccount token is available. Use AWX-managed credentials or Vault to inject the token and CA file into the job environment; verify connectivity and RBAC. Consult AWX tutorial.

Install using distribution packages

Install Python 3, Requests, and PyYAML from native distribution repositories as described in the User Guide. No kubectl, Helm, Kubernetes SDK, pip, or additional runtime package is required for these checks.

Validate and run

python3 ipsonic-probe.py --validate --strict examples/190-k8s-service-clusterip.yaml
python3 ipsonic-probe.py examples/190-k8s-service-clusterip.yaml --output nagios
python3 ipsonic-probe.py --inventory examples/ --format tsv

Check the DNS/TCP/HTTP examples against real network conditions before deploying. --validate checks syntax, not Kubernetes connectivity or RBAC.