Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

845
Visualizações
Why can I not use port 80 when using K3s Kubernetes

I have a simple NodeJS project running on a K3s cluster on a Raspberry Pi 4. The cluster has a service to expose it. The code is as follows...

spec:
  type: LoadBalancer
  ports:
    - protocol: TCP
      port: 3000
      targetPort: 3000

I want to try and use port 80 instead of 3000 so I try...

spec:
  type: LoadBalancer
  ports:
    - protocol: TCP
      port: 80
      targetPort: 3000

But it can't use the port.

Warning FailedScheduling 5m 0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.

Why am I having issues?

Update

Per the answer I tried...

pi@raspberrypi:~ $ sudo netstat -tulpn | grep :80
pi@raspberrypi:~ $ sudo ss -tulpn | grep :80
pi@raspberrypi:~ $ 

My guess is this is a K3s or Pi limitation.

Update 2

When I run kubectl get service --all-namespaces

NAMESPACE        NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)                      AGE
default          kubernetes           ClusterIP      10.43.0.1       <none>          443/TCP                      24d
kube-system      kube-dns             ClusterIP      10.43.0.10      <none>          53/UDP,53/TCP,9153/TCP       24d
kube-system      metrics-server       ClusterIP      10.43.48.200    <none>          443/TCP                      24d
kube-system      traefik-prometheus   ClusterIP      10.43.89.96     <none>          9100/TCP                     24d
kube-system      traefik              LoadBalancer   10.43.65.154    192.168.x.xxx   80:31065/TCP,443:32574/TCP   24d
test-namespace   app-tier             LoadBalancer   10.43.190.179   192.168.x.xxx   3000:31500/TCP               4d
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

k3s comes with a pre-installed traefik ingress controller which binds to 80, 443 and 8080 on the host, alhtough you should have seen that with ss or netstat

You should see this service if you run:

kubectl get service --all-namespaces

Although you should have seen it with netstat or ss if something is using the port if this is the case. But mb this service also failed to deploy but somehow blocks k3s from taking the port.

Another thing I can think of: Are you running the experimental rootless setup?

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda