Closed sergio-tarazona closed 2 years ago
@sergio-tarazona Looking at the error, either there is a network problem on the node the task was running or pods in your cluster do not have access to external network by default.
[…] unable to access 'https://github.com/avinashupadhya99/kubegen/': Could not resolve host: github.com […]
This is from the error you sent, and it says it cannot resolve github.com (aka no dns, no network, …)
@vdemeester thanks for your feedback, I created a pod with the image git-init to check DNS resolution:
sergio@sergio-Inspiron-3493:~/tekton/test$ kubectl run git -ti --image=gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.21.0 --command -- '/bin/sh'
If you don't see a command prompt, try pressing enter.
/ # nslookup github.com
Server: 10.43.0.10
Address: 10.43.0.10:53
Non-authoritative answer:
Non-authoritative answer:
Name: github.com
Address: 20.201.28.151
/ # nslookup github.com
Server: 10.43.0.10
Address: 10.43.0.10:53
Non-authoritative answer:
Non-authoritative answer:
Name: github.com
Address: 20.201.28.151
/ # nslookup github.com
Server: 10.43.0.10
Address: 10.43.0.10:53
Name: github.com
Address: 20.201.28.151
/ # nslookup github.com
Server: 10.43.0.10
Address: 10.43.0.10:53
Name: github.com
Address: 20.201.28.151
I don't know why it fails because the resolution seems ok, the workaround I found was to add this line in git-clone task:
echo "$(sed '2,$c nameserver 8.8.8.8' /etc/resolv.conf)" > /etc/resolv.conf
So far it's working.
Thanks, Sergio
@sergio-tarazona - I also have this issue, any update? how did you add this command: echo "$(sed '2,$c nameserver 8.8.8.8' /etc/resolv.conf)" > /etc/resolv.conf
while running as non-root with fsgroup:65532
?
Expected Behavior
I'm trying to execute the pipeline in this guide: https://hashnode.com/post/tekton-ci-simplified-ckzleauyw0n6beks1diq6ejvv It should clone a repo, then create an image and push it to docker hub.
Actual Behavior
I'm getting this error:
Steps to Reproduce the Problem
Follow this steps: https://hashnode.com/post/tekton-ci-simplified-ckzleauyw0n6beks1diq6ejvv 1.Create the tasks (clone, lint, npm and kaniko) 2.Create the pipeline 3.Create the pipelinerun
Additional Info