首页
视频
资源
登录
原
Kubernetes 自定义Endpoint资源
2038
人阅读
2021/12/13 11:06
总访问:
1026479
评论:
0
收藏:
0
手机
分类:
容器编排
 >#Kubernetes 自定义Endpoint资源 [TOC] tn2>当pod需要服务发布出去的时候中间所关联的还有一个Endpoint这个资源,它能确定服务关联的有哪些pod。  tn2>当我们想引用外部应用服务到集群中的时候,可以通过Endpoint资源进行添加。 比如我们引用外部的Mysql 如下图所示  实现案例 ------------ >### 安装mysql ```bash yum install mariadb-server -y # or apt-get install mariadb-server -y systemctl start mariadb ``` >### 创建mysql服务 ```bash vim mysql_service.yaml ``` ```yaml apiVersion: v1 kind: Service metadata: name: mysql spec: type: ClusterIP ports: - port: 3306 ``` ```bash kubectl apply -f mysql_service.yaml kubectl describe svc mysql ```  >### 创建外部mysql关联的endpoint ```bash vim mysql_endpoint.yaml ``` ```bash apiVersion: v1 kind: Endpoints metadata: name: mysql subsets: - addresses: - ip: 192.168.40.182 ports: - port: 3306 ``` ```bash kubectl apply -f mysql_endpoint.yaml ```  tn>可能会很疑惑:它们是怎么绑定的呢?是通过相同的名字来进行绑定的(`.metadata.name`)。
欢迎加群讨论技术,群号:677373950
评价
{{titleitem}}
{{titleitem}}
{{item.content}}
{{titleitem}}
{{titleitem}}
{{item.content}}
尘叶心繁
这一世以无限游戏为使命!
博主信息
排名
6
文章
6
粉丝
16
评论
8
文章类别
.net后台框架
143篇
linux
17篇
linux中cve
1篇
windows中cve
0篇
资源分享
10篇
Win32
3篇
前端
27篇
传说中的c
4篇
Xamarin
9篇
docker
15篇
容器编排
75篇
grpc
4篇
Go
15篇
yaml模板
1篇
理论
2篇
更多
Sqlserver
4篇
云产品
38篇
git
3篇
Unity
1篇
考证
2篇
RabbitMq
23篇
Harbor
1篇
Ansible
8篇
Jenkins
17篇
Vue
1篇
Ids4
18篇
istio
1篇
架构
2篇
网络
1篇
windbg
1篇
最新文章
Windbg 解决 No symbols for ntdll. Cannot continue.
Dapr 分布式锁
Dapr 负载均衡
Kubernetes .Net6 CRD
.net 6 解决The SSL connection could not be established
Kubernetes Telepresence 本地上云工具
.Net6 设置信任自签证书(浏览器可信任)
Rabbitmq 内存占用过高问题
SqlServer 磁盘空间的清理
Kubernetes .Net6 Webhook
git 连接Azure需要密码
最新评价
{{item.articleTitle}}
{{item.blogName}}
:
{{item.content}}
关于我们
ICP备案 :
渝ICP备18016597号-1
网站信息:
2018-2022
TNBLOG.NET
技术交流:
群号677373950
联系我们:
contact@tnblog.net
欢迎加群
欢迎加群交流技术