fenixsoft / awesome-fenix

讨论如何构建一套可靠的大型分布式系统
https://icyfenix.cn
8.81k stars 1.02k forks source link

「Comment」https://icyfenix.cn/exploration/projects/microservice_arch_kubernetes.html #113

Open fenixsoft opened 4 years ago

fenixsoft commented 4 years ago

https://icyfenix.cn/exploration/projects/microservice_arch_kubernetes.html

jieaotulip commented 3 years ago

赞,之前对容器管理了解的很浅,也没有在实际中使用过,后面会跟着周老师提供的工程和文档,系统的探索。提炼出可以根据业务需求和场景来应变的最佳实践。总结出个人的理解和想法。在使用中不断精进。

manyouying commented 3 years ago

需求场景->目标二的在命令式编程的支持下,应该改为在声明式编程的支持下吧

fenixsoft commented 3 years ago

@manyouying 需求场景->目标二的在命令式编程的支持下,应该改为在声明式编程的支持下吧

感谢指正,已更新。

wangpiju commented 2 years ago
unable to recognize "https://raw.githubusercontent.com/fenixsoft/microservice_arch_kubernetes/master/bookstore.yml": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"
allenz92 commented 2 years ago

@wangpiju

unable to recognize "https://raw.githubusercontent.com/fenixsoft/microservice_arch_kubernetes/master/bookstore.yml": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"

我遇到跟你一样的问题, 你解决没有?

fenixsoft commented 2 years ago

@allenz92

@wangpiju

unable to recognize "https://raw.githubusercontent.com/fenixsoft/microservice_arch_kubernetes/master/bookstore.yml": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"

我遇到跟你一样的问题, 你解决没有?

现在版本的k8s的role和rolebinding已经不在v1bate1了,改到了v1组上,将bookstore.yml中的“rbac.authorization.k8s.io/v1beta1”修改为“rbac.authorization.k8s.io/v1”

wangpiju commented 2 years ago

我解決了,需要自行更新版本

Allen Zhou @.***>於 2022年2月25日 週五,下午3:37寫道:

@wangpiju https://github.com/wangpiju

unable to recognize "https://raw.githubusercontent.com/fenixsoft/microservice_arch_kubernetes/master/bookstore.yml": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"

我遇到跟你一样的问题, 你解决没有?

— Reply to this email directly, view it on GitHub https://github.com/fenixsoft/awesome-fenix/issues/113#issuecomment-1050608399, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAL4HWHFE3IOM6MQYSRKP3U44WURANCNFSM4MH3OJ7A . You are receiving this because you were mentioned.Message ID: @.***>

SBZORRO commented 2 years ago

周老师, 使用minikube部署(driver=docker, fedora35)之后, 执行“$ kubectl apply -f /path/project/bookstore.yml”, 没有报错, 但是访问 “http://localhost:30080” 报错 “unable to connect". 在minikube dashboard services标签看到以下信息:

Name: gateway Labels: app: gateway Type: NodePort Cluster IP: 10.105.193.247 Internal Endpoints: gateway.bookstore-microservices:8080 TCP gateway.bookstore-microservices:30080 TCP

访问”http://10.105.193.247:30080/“ 报错变成了 “The connection has timed out” 这是我电脑太慢了么? 请问是啥问题, 怎么查错?

我搞定了, ”minikube service list“ 会打印出URL, 就可以访问了。 之前运行过“minikube service -n bookstore-microservices gateway“, 但什么都没有发生。。。"minikube service -n bookstore-microservices --all" OK

xuchaoguo1983 commented 2 years ago

在本地mac上启动后发现30080端口无法访问,需要通过 kubectl port-forward service/gateway -n bookstore-microservices 30080:8080 才能实现端口转发。看来mac本地使用docker desktop with k8s不能直接使用NodePort。

Junior233 commented 2 years ago

服务间的网络不通 Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na] at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[na:na] at java.base/java.net.Socket.connect(Socket.java:591) ~[na:na] at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.12.jar!/:4.5.12] ... 65 common frames omitted 2022-04-21 08:58:21.424 WARN 1 --- [nio-8080-exec-9] o.s.c.n.z.filters.post.SendErrorFilter : Error during filtering com.netflix.zuul.exception.ZuulException: Forwarding error at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.handleException(SimpleHostRoutingFilter.java:261) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:241) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:118) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116) ~[zuul-core-1.3.1.jar!/:1.3.1] at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81) ~[zuul-core-1.3.1.jar!/:1.3.1] at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:166) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:45) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109) ~[spring-boot-actuator-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33] at java.base/java.lang.Thread.run(Thread.java:835) ~[na:na] Caused by: org.apache.http.conn.HttpHostConnectException: Connect to security:80 [security/10.101.245.19] failed: Connection refused (Connection refused) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) ~[httpclient-4.5.12.jar!/:4.5.12] at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forwardRequest(SimpleHostRoutingFilter.java:422) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forward(SimpleHostRoutingFilter.java:341) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:236) ~[spring-cloud-netflix-zuul-2.2.2.RELEASE.jar!/:2.2.2.RELEASE] ... 55 common frames omitted Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na] at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[na:na] at java.base/java.net.Socket.connect(Socket.java:591) ~[na:na] at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75) ~[httpclient-4.5.12.jar!/:4.5.12] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.12.jar!/:4.5.12]

nova-qiang commented 2 years ago

com.github.fenixsoft.bookstore.account.applicaiton 包名和文件名,都有拼写错误。

jsrdxzw commented 2 years ago

每次修改调试都会生成新的镜像,感觉这样一会儿磁盘就满了啊。。