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

Server type: NodePort can't be accessed outside cluster #85757

Open
lucasOliveira91 opened this issue Nov 29, 2019 · 2 comments

Comments

@lucasOliveira91
Copy link

@lucasOliveira91 lucasOliveira91 commented Nov 29, 2019

I've seen a lot answers with subject seems like that but nothing can help me.
I've configured the cluster kubernetes in three servers, i can do deploy through jenkins my apps are started without errors.
Into the server master i can run curl :30000 and this way i can see the application is up.
but when i try to access outside the server, it's occurs connection time out.

My deployment.yaml:

apiVersion: v1
kind: Service
metadata:
  name: postalis-online-frontend
  labels:
    app: postalis-online-frontend
spec:
  ports:
    - port: 80
      targetPort: 80
      nodePort: 30001
  selector:
    app: postalis-online-frontend
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postalis-online-frontend-deployment
  labels:
    app: postalis-online-frontend
spec:
  replicas: 2
  selector:
    matchLabels:
      app: postalis-online-frontend
  template:
    metadata:
      labels:
        app: postalis-online-frontend
    spec:
      containers:
        - name: postalis-online-frontend
          image: "foguetinho.postalis.org.br:5001/postalis-online-frontend:latest"
          imagePullPolicy: Always
          ports:
            - containerPort: 80
      imagePullSecrets:
        - name: my-secret

My deployed applications, there are two with two instances each one.

image

my iptables, i realized that it's missing chain for the kubernetes
image

I think can be something simple that i forgot to configure
I need help i've tried to solve this a lot over the internet through searches

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Nov 29, 2019

@lucasOliveira91: There are no sig labels on this issue. Please add a sig label by either:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <group-name>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. See the group list.
The <group-suffix> in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lucasOliveira91

This comment has been minimized.

Copy link
Author

@lucasOliveira91 lucasOliveira91 commented Nov 29, 2019

/sing network

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.