It does not work with NodePort configuration (localhost:3000 is hardcoded)
See original GitHub issueBecause of network and firewall and other reasons, I can’t just do
kubectl port-forward deployment/spekt8 3000:3000
Instead I had to install it using NodePort.
Now spekt8 shows me a blank screen for it tries to access localhost:3000
instead of THE_IP_ADDRESS:THE_PORT (i.e. this localhost:3000
is harcoded)
below are the YAML settings I used to install it:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spekt8
spec:
selector:
matchLabels:
k8s-app: spekt8
replicas: 1
template:
metadata:
labels:
k8s-app: spekt8
spec:
containers:
- name: spekt8
image: elliotxkim/spekt8
ports:
- containerPort: 3000
---
kind: Service
apiVersion: v1
metadata:
name: spekt8
labels:
k8s-app: spekt8
spec:
ports:
- protocol: TCP
port: 3000
type: NodePort
selector:
k8s-app: spekt8
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Node.js Port 3000 already in use but it actually isn't?
I have been working with a node. js project for a few weeks and it has been working great. Usually, I use npm...
Read more >Using a NodePort - Getting Traffic into a Cluster
A node port exposes the service on a static port on the node IP address. NodePorts are in the 30000-32767 range by default,...
Read more >Kubernetes Series - 8: Deploy a Full Stack Application in ...
Please observe, I have hardcoded the name of the backend service ( flask-service). Basically, it will proxy any request from “localhost:3000” to ...
Read more >Developer Guide OpenShift Container Platform 3.11
These topics help developers set up and configure a workstation to develop and deploy applications in an OpenShift Container Platform cloud environment with ......
Read more >A Primer: Accessing services in Kubernetes - Alex Ellis' Blog
You can actually change security settings so that you can bind NodePorts to port 80 and 443. Do not do this. You can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this worked for me but just shouldn’t be necessary. Please allow remote access instead of hardcoding localhost:3000
You can use ssh tunneling as a workaround.
My example k8s environment is 3 nodes built with vagrant. I create ssh tunnel using command:
Then spekt8 page can be accessed from local host with
http://localhost:3000