1

I am trying to run e2e tests on Kubernetes cluster but while running Pods are pulled from docker and the docker is using default username present in the git-hub and the limit is exceeding.

I need to pass my docker user credential while running e2e test.

Any thing i can export / pass my user credential while running e2e test. I am using Ginkgo framework to trigger the e2e test

1 Answer 1

0

Welcome to community!

From kubernetes perspective it's possible to pass environment variables to containers running in pods. You'll need to specify them in your yaml file for pods. Here is an example from kubernetes documentation:

apiVersion: v1
kind: Pod
metadata:
  name: envar-demo
  labels:
    purpose: demonstrate-envars
spec:
  containers:
  - name: envar-demo-container
    image: gcr.io/google-samples/node-hello:1.0
    env:
    - name: DEMO_GREETING
      value: "Hello from the environment"
    - name: DEMO_FAREWELL
      value: "Such a sweet sorrow"

Please find k8s documentation on how to set it up - define environment variable for containers

Once you manage with this part, you should consider doing it securely. For this matter it's advise to use kubernetes secrets.

In this kubernetes documentation (Distribute Credentials Securely Using Secrets) you will find all steps and examples on how you can do it.

Keeping this in mind, there might be other solutions build-in in e2e ginkgo solution.

Sign up to request clarification or add additional context in comments.

1 Comment

I wanted to pass my user credential while running/starting e2e tests on Kubernetes, as by default it is using Anonymous request and by this i am running out of docker limit. I am using this repository to validate/test the kubernetes cluster Repo: github.com/kubernetes/kubernetes/tree/master/test/e2e/storage

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.