tektoncd / website

Tekton Website
https://tekton.dev
Apache License 2.0
63 stars 153 forks source link

Document CPU and Memory Usage Requirements for Kind #437

Open oxr463 opened 2 years ago

oxr463 commented 2 years ago

Expected Behavior

task.tekton.dev/hello created

Actual Behavior

Error from server (InternalError): error when creating "hello-world.yaml": Internal error occurred: failed calling webhook "webhook.pipeline.tekton.dev": failed to call webhook: Post "https://tekton-pipelines-webhook.tekton-pipelines.svc:443/defaulting?timeout=10s": dial tcp 10.96.195.250:443: connect: connection refused

Steps to Reproduce the Problem

  1. Run tekton_in_kind.sh from here: https://github.com/tektoncd/plumbing/tree/main/hack#tekton_in_kindsh
  2. Create hello-world.yaml Task from "Getting started with Tasks" document.
  3. Run kubectl apply -f ./hello-world.yaml

Additional Info

kubectl get pods -A
NAMESPACE            NAME                                                 READY   STATUS    RESTARTS        AGE
kube-system          coredns-6d4b75cb6d-4mqvb                             1/1     Running   1 (4m47s ago)   59m
kube-system          coredns-6d4b75cb6d-vlf7h                             1/1     Running   1 (4m47s ago)   59m
kube-system          etcd-tekton-control-plane                            1/1     Running   0               4m37s
kube-system          kindnet-d4ghb                                        1/1     Running   1 (4m47s ago)   59m
kube-system          kindnet-hfs6z                                        1/1     Running   1 (4m47s ago)   59m
kube-system          kindnet-kn926                                        1/1     Running   1 (4m47s ago)   59m
kube-system          kube-apiserver-tekton-control-plane                  1/1     Running   0               4m37s
kube-system          kube-controller-manager-tekton-control-plane         1/1     Running   1 (4m47s ago)   59m
kube-system          kube-proxy-5wdfm                                     1/1     Running   1 (4m47s ago)   59m
kube-system          kube-proxy-qsjdd                                     1/1     Running   1 (4m47s ago)   59m
kube-system          kube-proxy-sm6vj                                     1/1     Running   1 (4m47s ago)   59m
kube-system          kube-scheduler-tekton-control-plane                  1/1     Running   1 (4m47s ago)   59m
local-path-storage   local-path-provisioner-9cd9bd544-gg6d7               1/1     Running   2 (4m4s ago)    59m
tekton-pipelines     tekton-dashboard-786b6b5579-fpxrz                    1/1     Running   1 (4m47s ago)   59m
tekton-pipelines     tekton-pipelines-controller-84d88f5678-2wspr         1/1     Running   1 (4m47s ago)   59m
tekton-pipelines     tekton-pipelines-webhook-77cfb7d667-rx74b            1/1     Running   1 (4m47s ago)   59m
tekton-pipelines     tekton-triggers-controller-74b654c6bc-r9rs7          1/1     Running   1 (4m47s ago)   59m
tekton-pipelines     tekton-triggers-core-interceptors-79f4dbb969-qwct5   1/1     Running   2 (4m24s ago)   59m
tekton-pipelines     tekton-triggers-webhook-56885c9875-9m9hb             1/1     Running   1 (4m47s ago)   59m
AlanGreene commented 2 years ago

This seems like an issue with the health of your kind cluster, perhaps it does not have sufficient resources. I would not expect to see most of your pods restart as they appear to have in your output.

Are you running on docker or podman? Which Tekton versions, etc.

I've just run the script myself and was able to apply the Task successfully. CONTAINER_RUNTIME=docker ./tekton_in_kind.sh

oxr463 commented 2 years ago

This seems like an issue with the health of your kind cluster, perhaps it does not have sufficient resources.

Do you happen to know what the minimum resource requirements are? I've got a vagrant box with 2 GB RAM and 2 vCPU at the moment.

Are you running on docker or podman? Which Tekton versions, etc.

kind --version
kind version 0.14.0

docker --version
Docker version 20.10.16, build aa7e414fdcb23a66e8fabbef0a560ef1769eace5

kubectl get nodes
NAME                   STATUS   ROLES           AGE   VERSION
tekton-control-plane   Ready    control-plane   10d   v1.24.0
tekton-worker          Ready    <none>          10d   v1.24.0
tekton-worker2         Ready    <none>          10d   v1.24.0

tkn version
Client version: 0.26.0
Pipeline version: v0.39.0
Triggers version: v0.21.0
Dashboard version: v0.28.0
oxr463 commented 1 year ago

@AlanGreene do you know what the minimum requirements are or where they can be found?

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

oxr463 commented 1 year ago

/remove-lifecycle stale

oxr463 commented 1 year ago

Ping @AlanGreene

oxr463 commented 1 year ago

I found the answer:

docker stats --no-stream
CONTAINER ID   NAME                   CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O        PIDS
2789f5060266   tekton-control-plane   28.60%    651.5MiB / 7.676GiB   8.29%     7.01MB / 13.7MB   1.43MB / 744MB   261
efe407665ae4   tekton-worker2         6.86%     249MiB / 7.676GiB     3.17%     219MB / 3.51MB    319kB / 723MB    187
4b73d90a0f74   tekton-worker          3.26%     155.1MiB / 7.676GiB   1.97%     71MB / 4.65MB     1.06MB / 324MB   123
8fe0860695c5   kind-registry          0.00%     5.164MiB / 7.676GiB   0.07%     4.21kB / 1.09kB   4.1kB / 0B       8

We're basically looking at ~1GiB just idling.

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

oxr463 commented 1 year ago

/remove-lifecycle stale

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

oxr463 commented 1 year ago

/remove-lifecycle stale