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

Kubernetes Example Address already in use #872

Closed
dweidenfeld opened this issue Nov 22, 2016 · 2 comments
Closed

Kubernetes Example Address already in use #872

dweidenfeld opened this issue Nov 22, 2016 · 2 comments

Comments

@dweidenfeld
Copy link

Hey there,

I have a plain fresh Kuberentes setup running. Now I wanted to add Treafik, but it gives me an error, that the address 8080 is already in use:

kubectl apply -f traefik.yaml

The config is the default config from the examples folder.

Error syncing pod, skipping: failed to "StartContainer" for "traefik-ingress-lb" with CrashLoopBackOff: "Back-off 10s restarting failed container=traefik-ingress-lb pod=traefik-ingress-controller-2249976834-5a8l0_kube-system(d61d4637-b0af-11e6-9d04-0050563cd6c3)"

or the logs

time="2016-11-22T12:35:00Z" level=fatal msg="Error creating server: listen tcp :8080: bind: address already in use"

of course the port 8080 is already in use, because the api server uses it

tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      0          1750820     21231/kube-apiserve...

Any ideas? Thank you :)

@jonaz
Copy link
Contributor

jonaz commented Nov 22, 2016

Dont use 8080 for the web ui. Change to 8081 for example

apiVersion: v1
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: traefik-ingress-controller
  namespace: kube-system
  labels:
    k8s-app: traefik-ingress-lb
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: traefik-ingress-lb
  template:
    metadata:
      labels:
        k8s-app: traefik-ingress-lb
        name: traefik-ingress-lb
    spec:
      terminationGracePeriodSeconds: 60
      hostNetwork: true
      containers:
      - image: traefik
        name: traefik-ingress-lb
        resources:
          limits:
            cpu: 200m
            memory: 30Mi
          requests:
            cpu: 100m
            memory: 20Mi
        ports:
        - name: http
          containerPort: 80
          hostPort: 80
        - name: admin
          containerPort: 8081
        args:
        - --web
        - --web.address=:8081
        - --kubernetes

@dweidenfeld
Copy link
Author

Thank you that works

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants