Giter VIP home page Giter VIP logo

Comments (13)

k8s-ci-robot avatar k8s-ci-robot commented on June 11, 2024

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

from website.

tamilselvan1102 avatar tamilselvan1102 commented on June 11, 2024

/kind support

from website.

assafseif avatar assafseif commented on June 11, 2024

/kind support

what should i do?

from website.

tamilselvan1102 avatar tamilselvan1102 commented on June 11, 2024

you can deploy front-end/back-end app in k8s containers. Please check your app and its configurations

from website.

assafseif avatar assafseif commented on June 11, 2024

thats what i did exactly like this
https://kubernetes.io/docs/tasks/access-application-cluster/connecting-frontend-backend/

and i got this

2024/04/22 11:20:02 [emerg] 1#1: host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2
nginx: [emerg] host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2

from website.

tamilselvan1102 avatar tamilselvan1102 commented on June 11, 2024

which step did you get the error

from website.

assafseif avatar assafseif commented on June 11, 2024

i got crashloopbackoff when deploying frontend
what i showed you is the log of frontend deployment pod

from website.

tamilselvan1102 avatar tamilselvan1102 commented on June 11, 2024

crashloopbackoff may occur because of Resource Overload or Insufficient Memory, Misconfigurations. ...
please investigate your pod logs and resolve the issue

from website.

tamilselvan1102 avatar tamilselvan1102 commented on June 11, 2024

@assafseif
GitHub is not the right place for support requests.

If you're looking for help, check Server Fault.

You can also post your question on the Kubernetes Slack or the Discuss Kubernetes forum.

from website.

sftim avatar sftim commented on June 11, 2024

If you'd like to explain more about how to replicate the issue, @assafseif, we may be able to fix the documentation (we can't advise on specifics for your cluster).

/remove-kind support
/triage needs-information
/language en

from website.

assafseif avatar assafseif commented on June 11, 2024

If you'd like to explain more about how to replicate the issue, @assafseif, we may be able to fix the documentation (we can't advise on specifics for your cluster).

/remove-kind support /triage needs-information /language en
hello ,

What i tried to do is deploying frontend,
Check this one
https://kubernetes.io/docs/tasks/access-application-cluster/connecting-frontend-backend/#creating-the-frontend

kubectl apply -f https://k8s.io/examples/service/access/frontend-deployment.yaml
kubectl apply -f https://k8s.io/examples/service/access/frontend-service.yaml

crashloopbackoff occured inbside frontend-deployment pods,
when describing i got
host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2
nginx: [emerg] host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2

all files applied are from kubernetes docs

Regards

from website.

stmcginnis avatar stmcginnis commented on June 11, 2024

OK, looking in to this a little closer, it looks like there is an issue with the gcr.io/google-samples/hello-frontend:1.0 image used by frontend-deploy.yaml.

To clarify some of the description here, this is following the Connect a Frontend to a Backend Using Services tutorial. One of the steps there is to apply a manifest to create a new frontend deployment named frontend.

That deployment defines 1 replica, with the pod using the gcr.io/google-samples/hello-frontend:1.0 image.

The pod gets created, but ends up in a CrashLoopBackoff state. Describe the pod shows there is a problem in the events:

Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  31s                default-scheduler  Successfully assigned default/frontend-758994b889-tfd68 to kind-control-plane
  Normal   Pulling    31s                kubelet            Pulling image "gcr.io/google-samples/hello-frontend:1.0"
  Normal   Pulled     28s                kubelet            Successfully pulled image "gcr.io/google-samples/hello-frontend:1.0" in 3.247s (3.247s including waiting)
  Normal   Created    10s (x3 over 28s)  kubelet            Created container nginx
  Normal   Started    10s (x3 over 28s)  kubelet            Started container nginx
  Normal   Pulled     10s (x2 over 27s)  kubelet            Container image "gcr.io/google-samples/hello-frontend:1.0" already present on machine
  Warning  BackOff    10s (x3 over 26s)  kubelet            Back-off restarting failed container nginx in pod frontend-758994b889-tfd68_default(eae930af-0164-48a7-bc59-6022b8db560f)

In this case the pod name is frontend-758994b889-tfd68_default. If I get the logs we see the error mentioned above:

$ kubectl logs pod/frontend-758994b889-tfd68_default
2024/04/23 13:53:15 [emerg] 1#1: host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2
nginx: [emerg] host not found in upstream "hello" in /etc/nginx/conf.d/frontend.conf:2

This is after skipping the first half of the tutorial where the backend is created. Since this frontend proxies to the backend service, and the backend service defines a service named "hello", it appears the frontend will try to start, not find what it needs from the backend, and fail.

To check that, I then went back to the beginning and followed all steps up to the frontend deployment. After creating the backend as documented, the frontend was able to start and everything appears happy:

k get all
NAME                            READY   STATUS    RESTARTS        AGE
pod/backend-7f5b7998b9-2fcl2    1/1     Running   0               87s
pod/backend-7f5b7998b9-rv4mz    1/1     Running   0               87s
pod/backend-7f5b7998b9-snn5c    1/1     Running   0               87s
pod/frontend-758994b889-tfd68   1/1     Running   7 (5m21s ago)   11m

NAME                 TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
service/hello        ClusterIP   10.96.88.204   <none>        80/TCP    56s
service/kubernetes   ClusterIP   10.96.0.1      <none>        443/TCP   44m

NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/backend    3/3     3            3           87s
deployment.apps/frontend   1/1     1            1           11m

NAME                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/backend-7f5b7998b9    3         3         3       87s
replicaset.apps/frontend-758994b889   1         1         1       11m

from website.

tienhuynh17 avatar tienhuynh17 commented on June 11, 2024

Hmm, I face the same issue. And I have followed all steps of the tutorial.
image

from website.

Related Issues (20)

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.