Docker

干货 | 京东云Kubernetes集群+Traefik实战

放肆的年华 提交于 2021-02-16 16:41:03
摘要 Traefik支持丰富的annotations配置,可配置众多出色的特性,例如:自动熔断、负载均衡策略、黑名单、白名单。所以 Traefik对于微服务来说简直就是一神器。 利用Traefik,并结合京东云Kubernetes集群及其他云服务(RDS,NAS,OSS,块存储等), 可快速构建弹性扩展的微服务集群。 Traefik是一个为了让部署微服务更加便捷而诞生的现代HTTP反向代理、负载均衡工具。它支持多种后台(Kubernetes,Docker,Swarm,Marathon,Mesos,Consul,Etcd,Zookeeper等)。 本文大致步骤如下: Kubernetes权限配置(RBAC); Traefik部署; 创建三个实例服务; 生成Ingress规则,并通过PATH测试通过Traefik访问各个服务; Traefik配置域名及TLS证书,并实现HTTP重定向到HTTS。 本文部署Traefik使用到的Yaml文件均基于Traefik官方实例,并为适配京东云Kubernetes集群做了相关修改: https://github.com/containous/traefik/tree/master/examples/k8s 基本概念 1 Ingress边界路由 虽然Kubernetes集群内部署的pod、server都有自己的IP,但是却无法提供外网访问

Deploying Docker to AWS Elastic Beanstalk — how to forward port to host? (port binding)

旧街凉风 提交于 2021-02-16 14:56:46
问题 I have a project set up with CircleCI that I am using to auto-deploy to Elastic Beanstalk. My EBS environment is a single container, auto-scaling, web environment. I am trying to run a service that listens on raw socket port 8080. My Dockerfile: FROM golang:1.4.2 ... EXPOSE 8080 My Dockerrun.aws.json.template: { "AWSEBDockerrunVersion": "1", "Authentication": { "Bucket": "<bucket>", "Key": "<key>" }, "Image": { "Name": "project/hello:<TAG>", "Update": "true" }, "Ports": [ { "ContainerPort":

Can't connect to WSL2 localhost server from WSL2 docker container

时间秒杀一切 提交于 2021-02-16 13:20:28
问题 I am running a simple web server on https://0.0.0.0:4000 (accessible also as https://local.phx-cd.shoepping.at:4000 with mapping to 127.0.0.1 in Ubuntu hosts file) on my WSL2 Ubuntu. I can connect to it from both Ubuntu and Windows host - so far so good. But additionally, in my Docker for Win with WSL2 integration, I run a selenium chrome container which is connecting and testing stuff on that web server (using bridge), but it can't connect to it! I connected to the container and tried to

docker-compose: reinitializing MySQL db every time

牧云@^-^@ 提交于 2021-02-16 09:23:07
问题 We have a Rails app with MySQL as DB. The db part of docker-compose.yml looks like db: image: mysql env_file: - ma.env volumes: - ./dump-db:/docker-entrypoint-initdb.d - ./my.cnf:/etc/mysql/my.cnf restart: always ports: - "3306:3306" environment: - MYSQL_HOST= and under ./dump-db folder there actually is an sql-dump of our db. Problem is, we need to have that exact dump loaded each and every time docker-compose up is run. MySQL docker image works in such a way, that it stores it's data on

django cannot connect mysql in docker-compose

走远了吗. 提交于 2021-02-16 08:33:57
问题 I'm very new for docker, now I am trying to run django with mariadb in docker through docker-compose, but I always get this error: I use Docker version 17.09.1-ce, build 19e2cf6 , docker-compose version 1.18.0, build 8dd22a9 django.db.utils.OperationalError: (2003, 'Can\'t connect to MySQL server on \'mariadb55\' (111 "Connection refused")') I can connect db correctly after run docker-compose up db in local or remote, and I even can run python manage.py runserver 0.0.0.0:6001 correctly in

django cannot connect mysql in docker-compose

夙愿已清 提交于 2021-02-16 08:32:13
问题 I'm very new for docker, now I am trying to run django with mariadb in docker through docker-compose, but I always get this error: I use Docker version 17.09.1-ce, build 19e2cf6 , docker-compose version 1.18.0, build 8dd22a9 django.db.utils.OperationalError: (2003, 'Can\'t connect to MySQL server on \'mariadb55\' (111 "Connection refused")') I can connect db correctly after run docker-compose up db in local or remote, and I even can run python manage.py runserver 0.0.0.0:6001 correctly in

django cannot connect mysql in docker-compose

我怕爱的太早我们不能终老 提交于 2021-02-16 08:31:56
问题 I'm very new for docker, now I am trying to run django with mariadb in docker through docker-compose, but I always get this error: I use Docker version 17.09.1-ce, build 19e2cf6 , docker-compose version 1.18.0, build 8dd22a9 django.db.utils.OperationalError: (2003, 'Can\'t connect to MySQL server on \'mariadb55\' (111 "Connection refused")') I can connect db correctly after run docker-compose up db in local or remote, and I even can run python manage.py runserver 0.0.0.0:6001 correctly in

12.19 KubeSphere Meetup|闪电演讲+Workshop 新鲜出炉!

不想你离开。 提交于 2021-02-16 08:09:27
社区的技术活动由社区做主! 除了 14:00 ~ 16:00 的 Keynotes 分享 ,我们还为您提供展示技术才华的舞台,您可以 扫码海报 观看闪电演讲,或在 现场报名闪电演讲! 我们也为 DevOps 爱好者提供 现场动手实践交流的机会 ,欢迎 报名 参与 DevOps Workshop ,查看文末提前加入 Workshop 交流群,与 DevOps 教练面对面。 关于闪电演讲与 DevOps Workshop 的细节请看以下详细介绍。 ↓ 闪电演讲 「分享时间」 : 16:00 ~ 17:30 云原生的 WebAssembly 能取代 Docker 吗? 简介 Docker 创始人曾在推特上表示,如果WebAssembly 和 WASI 在2008年就诞生了,那么也没有创立 Docker 的必要了,WebAssembly 是云计算的未来。那么云原生的 WebAssembly 能取代 Docker 吗? 大纲 什么 是WebAssembly? WebAssembly 在云原生领域发挥的作用及应用场景 用 k8s 管理 WebAssembly 的解决方案 Docker 与 WebAssembly 之间的关系,是你死我亡,还是在云原生领域共同繁荣呢? 应用发布与多集群管理:使用 QKE 管理多个 ACK 集群 简介 QKE 可以提供开箱即用、高可用的 KubeSphere

Migrating existing containers from Hyper-V to WSL2 technology

不羁的心 提交于 2021-02-16 04:37:08
问题 After DockerCon 2020, I enthusiastically downloaded Windows 10 2004 and tried to upgrade Docker Desktop to WSL 2 containers and experiment. I had a few containers, in particular a couple of databases along with their data stored within volumes. Postgres and MS SQL Server in the case. I wouldn't like to lose the data, though it's not critical. I used Docker volumes rather than OS mounts because I have repeatedly seen that using Windows mounts for database data storage is not recommended. When

Migrating existing containers from Hyper-V to WSL2 technology

人盡茶涼 提交于 2021-02-16 04:33:39
问题 After DockerCon 2020, I enthusiastically downloaded Windows 10 2004 and tried to upgrade Docker Desktop to WSL 2 containers and experiment. I had a few containers, in particular a couple of databases along with their data stored within volumes. Postgres and MS SQL Server in the case. I wouldn't like to lose the data, though it's not critical. I used Docker volumes rather than OS mounts because I have repeatedly seen that using Windows mounts for database data storage is not recommended. When