Comments (2)
Using the label "nginx1" in the YAML pod and selector with the same name "nginx1" in the service YAML file, it works!!
# kubectl create -f nginx-server-pod.yaml
pod "nginx1" created
# kubectl create -f nginx-server-service.yaml
service "nginx1-lb" created
# kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx1 1/1 Running 0 1h
# kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.43.240.1 443/TCP 1h
nginx1-lb 10.43.246.188 X.X.153.44 80:30389/TCP 1h
from google-certified-professional-cloud-architect.
In the pod and service yaml files, I replaced the sshfs service by simple nginx, still cannot reach nginx port 80 from outside.
BUT, manually create the pod and the service works!!! So the issue is in the YAML files.
Manually create a pod
kubectl run nginx --image=ajnouri/nginx --port=80
Manually create a service for the pod
kubectl expose deployment nginx --type="LoadBalancer"
from google-certified-professional-cloud-architect.
Related Issues (12)
- [GCE]: SDK node doesn't recognize "kubectl" HOT 1
- [GCE] : Troubleshoot a pod successfully created, but container doesn't start. HOT 1
- [GCE] : Google beta container images "describe" option doesn't exist HOT 1
- [Compute Engine] Issue configuring Google Nested Virtualization
- [Container Engine]: After installing/updating SDK, "kubectl" Not recognized
- [GC SDK]: ERROR: (gcloud.container.clusters.delete) ResponseError: code=404, message=The resource "projects/linuxacademy-traininig" was not found. HOT 1
- docker doesn't support "docker login -e" HOT 1
- [GCE SDK]: gcloud create" command HOT 1
- [GCE] error: failed to discover supported resources HOT 1
- [GCE] : The Container Engine API is not enabled for project ... HOT 1
- [GCE]: The connection to the server localhost:8080 was refused HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-certified-professional-cloud-architect.