首页
视频
资源
登录
原
Kubernetes 自定义Endpoint资源
1462
人阅读
2021/12/13 11:06
总访问:
843348
评论:
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后台框架
139篇
linux
16篇
linux中cve
1篇
windows中cve
0篇
资源分享
10篇
Win32
3篇
前端
27篇
传说中的c
4篇
Xamarin
9篇
docker
14篇
容器编排
61篇
grpc
4篇
Go
15篇
yaml模板
1篇
理论
2篇
更多
Sqlserver
2篇
云产品
36篇
git
2篇
Unity
1篇
考证
2篇
RabbitMq
22篇
Harbor
1篇
Ansible
8篇
Jenkins
17篇
Vue
1篇
Ids4
18篇
istio
1篇
架构
2篇
最新文章
.Net6 Ocelot 与 Kubernetes
Visual Studio 连接 Kubernetes 调试
网络 SNAT与DNAT
ARP与Proxy ARP
Xamarin 天气预报小项目(ListView)
Xamarin.Forms Image
Xamarin.Forms Button
Win Ubuntu双系统 apt 证书问题 Certificate verification failed: The certificate is NOT trusted.
Kubernetes 网络名称空间与网桥(Bridge)
Xamarin.Forms Entry 文本框
Xamarin.Forms Label
最新评价
{{item.articleTitle}}
{{item.blogName}}
:
{{item.content}}
关于我们
ICP备案 :
渝ICP备18016597号-1
网站信息:
2018-2022
TNBLOG.NET
技术交流:
群号677373950
联系我们:
contact@tnblog.net
欢迎加群
欢迎加群交流技术