AWS Load Balancer Controller 实践

作者 : admin 本文共609个字,预计阅读时间需要2分钟 发布时间: 2024-06-10 共2人阅读

背景

通过编写K8S的Ingress 然后能自动创建 aws的LB

作用

控制器监视 Kubernetes Ingress 或 Service 资源。作为响应,它会创建相应的 AWS 弹性负载均衡资源。您可以通过对 Kubernetes 资源应用注释来配置负载均衡器的特定行为。例如,您可以使用注释将 AWS 安全组附加到负载均衡器。

参考文档

## 官网
http://docs.aws.amazon.com/zh_cn/eks/latest/userguide/aws-load-balancer-controller.html

## 参考文档
http://blog.csdn.net/fxtxz2/article/details/136500538

实践

## 创建命名空间
kubectl create ns devops-stg

deploy-svc.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tomcat-deploy
  namespace: devops-stg
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tomcat
  template:
    metadata:
      labels:
        app: tomcat
    spec:
      containers:
        - name: tomcat
          image: tomcat:9.0
          ports:
            - containerPort: 8080
          resources:
            limits:
              cpu: 500m
 
本站无任何商业行为
个人在线分享 » AWS Load Balancer Controller 实践
E-->