Giter Site home page Giter Site logo

Comments (2)

AJNOURI avatar AJNOURI commented on June 1, 2024 1

Using the label "nginx1" in the YAML pod and selector with the same name "nginx1" in the service YAML file, it works!!

selection_0210

# 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

selection_0211

from google-certified-professional-cloud-architect.

AJNOURI avatar AJNOURI commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.