我在使用 minikube 的 Linux 机器上完成了本教程:https ://tekton.dev/docs/getting-started/ 。但是出了点问题,我没有得到预期的echo
结果。
为了跟踪 TaskRun 进度运行:
➜ TWOC tkn task start hello && sleep 5 && kubectl get pods && tkn taskrun list
TaskRun started: hello-run-rjd2l
In order to track the TaskRun progress run:
tkn taskrun logs hello-run-rjd2l -f -n default
NAME READY STATUS RESTARTS AGE
twoc-backend-local-deployment-55b494d4cb-fjz6v 3/3 Running 12 7d22h
twoc-backend-local-deployment-55b494d4cb-vdtv5 3/3 Running 12 7d22h
NAME STARTED DURATION STATUS
hello-run-5f4qc --- --- ---
hello-run-5zck9 --- --- ---
hello-run-8sdmx --- --- ---
hello-run-bvhdg --- --- ---
hello-run-cdhz8 --- --- ---
hello-run-frbwf --- --- ---
hello-run-pzvbz --- --- ---
hello-run-q57p9 --- --- ---
hello-run-rjd2l --- --- ---
hello-run-tpnt7 --- --- ---
➜ TWOC kubectl describe taskrun hello-run-5zck9
Name: hello-run-5zck9
Namespace: default
Labels: <none>
Annotations: <none>
API Version: tekton.dev/v1beta1
Kind: TaskRun
Metadata:
Creation Timestamp: 2021-01-06T17:34:43Z
Generate Name: hello-run-
Generation: 1
Managed Fields:
API Version: tekton.dev/v1beta1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:generateName:
f:spec:
.:
f:resources:
f:serviceAccountName:
f:taskRef:
.:
f:name:
f:status:
.:
f:podName:
Manager: kubectl-create
Operation: Update
Time: 2021-01-06T17:34:43Z
Resource Version: 180093
Self Link: /apis/tekton.dev/v1beta1/namespaces/default/taskruns/hello-run-5zck9
UID: a9353809-44c0-4864-b131-f1ab52ac080d
Spec:
Resources:
Service Account Name:
Task Ref:
Name: hello
Events: <none>
➜ TWOC tkn taskrun logs --last -f
Error: task hello create has not started yet or pod for task not yet available
➜ TWOC kubectl describe task hello
Name: hello
Namespace: default
Labels: <none>
Annotations: <none>
API Version: tekton.dev/v1beta1
Kind: Task
Metadata:
Creation Timestamp: 2021-01-06T16:28:46Z
Generation: 1
Managed Fields:
API Version: tekton.dev/v1beta1
Fields Type: FieldsV1
fieldsV1:
f:spec:
.:
f:steps:
Manager: kubectl-create
Operation: Update
Time: 2021-01-06T16:28:46Z
API Version: tekton.dev/v1beta1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
Manager: kubectl-client-side-apply
Operation: Update
Time: 2021-01-06T17:34:07Z
Resource Version: 180053
Self Link: /apis/tekton.dev/v1beta1/namespaces/default/tasks/hello
UID: 4dc3e52e-4407-4921-8365-7e8845eb8c6b
Spec:
Steps:
Args:
Hello World!
Command:
echo
Image: ubuntu
Name: hello
Events: <none>
➜ TWOC git:(master) ✗ kubectl get pods --namespace tekton-pipelines
NAME READY STATUS RESTARTS AGE
tekton-dashboard-6884b7b896-qtx4t 1/1 Running 3 8d
tekton-pipelines-controller-7c5494d584-d6gkn 1/1 Running 5 8d
tekton-pipelines-webhook-59c94c5c6d-nh8wc 1/1 Running 3 8d
➜ TWOC git:(master) ✗ kubectl get pods
NAME READY STATUS RESTARTS AGE
twoc-backend-local-deployment-55b494d4cb-fjz6v 3/3 Running 9 7d20h
twoc-backend-local-deployment-55b494d4cb-vdtv5 3/3 Running 9 7d20h