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

Network issue with docker on AWS EKS #97

Closed
phoenix-zhu opened this issue Mar 22, 2021 · 1 comment
Closed

Network issue with docker on AWS EKS #97

phoenix-zhu opened this issue Mar 22, 2021 · 1 comment

Comments

@phoenix-zhu
Copy link

phoenix-zhu commented Mar 22, 2021

Hey myoung34,

Thanks for making this image, I run into a network issue while using this image on AWS EKS cluster.

Here is my deployment config, copied from readme.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: actions-runner
  namespace: github
spec:
  replicas: 2
  selector:
    matchLabels:
      app: actions-runner
  template:
    metadata:
      labels:
        app: actions-runner
    spec:
      volumes:
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      - name: workdir
        hostPath:
          path: /tmp/github-runner
      containers:
      - name: runner
        image: myoung34/github-runner:latest
        imagePullPolicy: Always
        env:
        - name: ORG_RUNNER
          value: "true"
        - name: ORG_NAME
          value: myorg
        - name: LABELS
          value: test
        - name: RUNNER_TOKEN
          valueFrom:
            secretKeyRef:
              key: RUNNER_TOKEN
              name: actions-runner
        - name: REPO_URL
          value: https://github.com/myorg
        - name: RUNNER_NAME_PREFIX
          value: test
        - name: RUNNER_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: RUNNER_WORKDIR
          value: /tmp/github-runner
        - name: RUNNER_GROUP
          value: test
        volumeMounts:
        - name: dockersock
          mountPath: /var/run/docker.sock
        - name: workdir
          mountPath: /tmp/github-runner

While I run docker on the runner, the containers couldn't access the internet. I log into the pod and run a docker image, there isn't any network in that container. I tried the same thing on my laptop, everything was good, not really sure the reason. Setting the -net=host with docker command is a workaround but ugly. I was wondering whether there is a better solution for this?

Hope these screenshots would help you understand.

On my Laptop
image

On EKS
image

Zhu Ye

@myoung34
Copy link
Owner

This is outside the scope of this project but your issue is likely that you need --enable-docker-bridge for EKS. See here

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

2 participants