Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeconfig creator Task #1232

Open
tppalani opened this issue Feb 8, 2024 · 0 comments
Open

kubeconfig creator Task #1232

tppalani opened this issue Feb 8, 2024 · 0 comments

Comments

@tppalani
Copy link

tppalani commented Feb 8, 2024

Expected Behavior

Actual Behavior

  1. I have installed Tekton inside GKE cluster.
  2. Using following https://github.com/tektoncd/catalog/tree/main/task/kubeconfig-creator/0.1/samples page i have created PVC, authentication-test Task, kubeconfig creator task, Pipeline and pipeline-run.yaml
  3. When I created pipelinerun yaml, i can pipeline able to see workspace which contains kubeconfig file with cluster details but i have kubectl get pod command inside the task yaml, which is throughs Unable to connect to the server: dial tcp 192.82.1.1:443: i/o timeout

Steps to Reproduce the Problem

Task.yaml

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: authentication-test
  namespace: caas-devops-test
spec:
  params:
    - name: filename
      description: kubeconfig file name
      type: string
  workspaces:
    - name: input
  steps:
    - name: get
      image: quay.io/openshift/origin-cli:4.6
      script: |

        export KUBECONFIG="$(workspaces.input.path)/$(inputs.params.filename)"
        #
        # check that the cluster is configured
        cd workspace/input
        cat kubeconfig
        kubectl config use-context my-cluster-context
        kubectl get pod

pipeline.yaml

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: kubeconfig-test-pipeline
spec:
  workspaces:
    - name: shared-workspace
  tasks:
    - name: kubeconfig-creator
      taskRef:
        name: kubeconfig-creator
      workspaces:
        - name: output
          workspace: shared-workspace
      params:
        - name: name
          value: my-cluster-name
        - name: username
          value: my-cluster-username
        - name: url
          value: https://my-cluster-endpoint-address
        - name: cadata
          value:  my-cluster-ca-data
    - name: authentication-test
      taskRef:
        name: authentication-test
      workspaces:
        - name: input
          workspace: shared-workspace
      params:
        - name: filename
          value: kubeconfig
      runAfter:
        - kubeconfig-creator

Additional Info

Note: GKE cluster does not have clientCertificateData, clientKeyData because when i'm seeing GKE cluster overview details client certificate option has been disbaled due to this i'm not able to pass those 2 values inside the pipeline.yaml file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant