Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version:
Cloud being used: GKE
Installation method: N/A
Host OS: N/A
CNI and version:N/A
CRI and version: N/A
I completed my training course on youtube and started to test my knowledge by practicing k8s.
when practicing k8s I created a nodeport service with simple nginx container as deployment just like it shown in youtube. however it worked in the training video but when in my local the node’s external ip is not redirected to nginx container as needed.
I was unable to understand where I made mistake.
here is my yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment-np
spec:
replicas: 2
selector:
matchLabels:
app: my-app-np
template:
metadata:
labels:
app: my-app-np
spec:
containers:
- name: my-container
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: my-app-np
labels:
app: my-app-np
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: my-app-np
I tried accessing with the external ip with the node’s port 3***** series it returns nothing. ping is working with node’s external ip
This GCP is provided by Pluralsight’s Acloud Guru Training Portal.