Skip to content

Latest commit

 

History

History
145 lines (89 loc) · 2.67 KB

02-client-service.md

File metadata and controls

145 lines (89 loc) · 2.67 KB

[Stephen Grider] Microservices with Node JS and React [ENG, 2021]


Client Service


11. Integrating a Server-Side-Rendered React App


$ cd app
$ mkdir client
$ cd client
$ npm init -y
$ npm install react react-dom next
$ npm install bootstrap axios

http://SERVICENAME.NAMESPACE.svc.cluster.local

$ kubectl get ingress
NAME          CLASS    HOSTS           ADDRESS        PORTS   AGE
ingress-svc   <none>   ticketing.dev   192.168.49.2   80      8m41s

// NOT WORKS for ME.
http://ingress-svc.default.svc.cluster.local

$ kubectl exec -it auth-deployment-9f9c79479-v865d -- nslookup ingress-svc
Server:		10.96.0.10
Address:	10.96.0.10:53

** server can't find ingress-svc.cluster.local: NXDOMAIN

** server can't find ingress-svc.default.svc.cluster.local: NXDOMAIN

** server can't find ingress-svc.svc.cluster.local: NXDOMAIN

** server can't find ingress-svc.cluster.local: NXDOMAIN

** server can't find ingress-svc.svc.cluster.local: NXDOMAIN

** server can't find ingress-svc.default.svc.cluster.local: NXDOMAIN

command terminated with exit code 1

$ kubectl exec -ti auth-deployment-868cdc5b6c-66jdv -- nslookup 192.168.49.2
Server:		10.96.0.10
Address:	10.96.0.10:53

2.49.168.192.in-addr.arpa	name = 192-168-49-2.kubernetes.default.svc.cluster.local

https://ticketing.dev/


22. Back to the Client

$ cd client
$ npm install react-stripe-checkout

Testing card

https://stripe.com/docs/testing


4242 4242 4242 4242

  • Any 3 digits



Marley

Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат