{"id":22389245,"url":"https://github.com/wangcaitao/k8s-example","last_synced_at":"2026-05-01T01:31:39.898Z","repository":{"id":107496019,"uuid":"240873479","full_name":"wangcaitao/k8s-example","owner":"wangcaitao","description":"spring-boot + k8s + openfeign 实现微服务","archived":false,"fork":false,"pushed_at":"2020-02-16T11:47:39.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T21:31:55.817Z","etag":null,"topics":["ingress-nginx","microservice","openfeign","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangcaitao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T10:41:22.000Z","updated_at":"2020-02-16T11:56:39.000Z","dependencies_parsed_at":"2023-05-23T05:31:04.614Z","dependency_job_id":null,"html_url":"https://github.com/wangcaitao/k8s-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wangcaitao/k8s-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangcaitao%2Fk8s-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangcaitao%2Fk8s-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangcaitao%2Fk8s-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangcaitao%2Fk8s-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangcaitao","download_url":"https://codeload.github.com/wangcaitao/k8s-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangcaitao%2Fk8s-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ingress-nginx","microservice","openfeign","spring-boot"],"created_at":"2024-12-05T03:09:54.380Z","updated_at":"2026-05-01T01:31:39.882Z","avatar_url":"https://github.com/wangcaitao.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-example\n\n通过 spring-boot + k8s 实现微服务.\n\n## 环境说明\n\n* mac-10.15.3\n* spring-boot-2.1.12.RELEASE\n* jdk_1.8.0_191\n* docker-desktop-for-mac-2.2.0.0\n* docker-19.03.5\n* kubernetes-1.15.5\n* ingress-nginx-0.28.0\n\n## 部署\n\n所有部署文件在目录 `k8s` 里面. 两个环境, `test` 和 `prod`. 以下命令以 `prod` 环境说明. \n\n1. `% kubectl apply -f k8s/prod/namespace.yaml`\n1. `% kubectl apply -f k8s/prod`\n\n## 验证\n\n1. 配置 hosts. `% sudo vim /etc/hosts`\n\n    ```bash\n    127.0.0.1       api.example.com\n    ```\n\n1. GET `http://api.example.com/consumer/1`, 返回如下内容即可. \n\n    ```json\n    {\n        \"code\": 200,\n        \"msg\": \"请求成功\",\n        \"data\": {\n            \"id\": 1,\n            \"providerName\": \"provider\"\n        }\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangcaitao%2Fk8s-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangcaitao%2Fk8s-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangcaitao%2Fk8s-example/lists"}