Attempt to run sonobuoy on K8s cluster failed at pull images for the container.
Rivka-Elm opened this issue · comments
Attempt to run sonobuoy on K8s cluster failed at pull images for the container.
Step to reproduce:
- docker pull projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.0
- docker tag projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.0 my-registry:5000/projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.
- docker push my-registry:5000/projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.0
- create a file - conformance-image-config.yaml and the content file:
the first running puted
- dockerLibraryRegistry: mirror.gcr.io/library
and the second running puted - dockerLibraryRegistry: my-registry:5000
-
sonobuoy --kubeconfig ~/.kube/config run --sonobuoy-image bcmt-registry:5000/projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.0 --e2e-repo-config c.yaml
The result:
INFO[0000] created object name=sonobuoy namespace= resource=namespaces
INFO[0000] created object name=sonobuoy-serviceaccount namespace=sonobuoy resource=serviceaccounts
INFO[0000] created object name=sonobuoy-serviceaccount-sonobuoy namespace= resource=clusterrolebindings
INFO[0000] created object name=sonobuoy-serviceaccount-sonobuoy namespace= resource=clusterroles
INFO[0000] created object name=sonobuoy-config-cm namespace=sonobuoy resource=configmaps
INFO[0000] created object name=sonobuoy-plugins-cm namespace=sonobuoy resource=configmaps
INFO[0000] created object name=sonobuoy namespace=sonobuoy resource=pods
INFO[0000] created object name=repolist-cm namespace=sonobuoy resource=configmaps
INFO[0000] created object name=sonobuoy-aggregator namespace=sonobuoy resource=services -
sonobuoy status
The result:
PLUGIN STATUS RESULT COUNT
e2e failed failed 1
systemd-logs failed failed 5
Sonobuoy has completed. Usesonobuoy retrieve
to get results. -
check the result:
[root@rome-rome-masterbm-0 ~]# resultsFile=$(sonobuoy retrieve)
[root@rome-rome-masterbm-0 ~]# sonobuoy results $resultsFile
Plugin: systemd-logs
Status: failed
Total: 5
Passed: 0
Failed: 5
Skipped: 0
Failed tests:
Failed to pull image for container systemd-logs within 5m0s. Container is in state ImagePullBackOff
Failed to pull image for container systemd-logs within 5m0s. Container is in state ImagePullBackOff
Failed to pull image for container systemd-logs within 5m0s. Container is in state ImagePullBackOff
Failed to pull image for container systemd-logs within 5m0s. Container is in state ImagePullBackOff
Failed to pull image for container systemd-logs within 5m0s. Container is in state ImagePullBackOff
Plugin: e2e
Status: failed
Total: 1
Passed: 0
Failed: 1
Skipped: 0
Failed tests:
Failed to pull image for container e2e within 5m0s. Container is in state ImagePullBackOff -
The Errors in the sonobuoy status command
time="2020-11-24T08:16:30Z" level=info msg="Namespace sonobuoy Matched=true"
time="2020-11-24T08:16:30Z" level=info msg="Collecting Pod Logs by namespace (sonobuoy)"
time="2020-11-24T08:16:30Z" level=error msg="error querying pod logs under namespace sonobuoy: the server rejected our request for an unknown reason (get pods sonobuoy-e2e-job-5948ab06
time="2020-11-24T08:16:30Z" level=info msg="Collecting Pod Logs by FieldSelectors []"
time="2020-11-24T08:16:30Z" level=info msg="Log lines after this point will not appear in the downloaded tarball."
time="2020-11-24T08:16:30Z" level=info msg="Results available at /tmp/sonobuoy/202011240811_sonobuoy_f8f01d1c-6fe7-4917-b97c-22be7cdb9705.tar.gz"
time="2020-11-24T08:16:30Z" level=info msg="no-exit was specified, sonobuoy is now blocking"
More information
Reference steps: https://sonobuoy.io/docs/master/airgap/
The cluster uses the private registry.
Environment:
-
Sonobuoy version: v0.19.0
-
Kubernetes version: v1.18.8:
-
Kubernetes installer & version:
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitTreeState:"clean",
GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitTreeState:"clean", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"} -
Cloud provider or hardware configuration:
-
OS (e.g. from
/etc/os-release
): CentOS 7 -
Sonobuoy tarball (which contains * below)
https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.19.0/sonobuoy_0.19.0_linux_amd64.tar.gz