当我尝试在AWS EKS中应用新的服务部署yaml时,它没有从以前的构建/部署中删除旧的负载平衡器
apiVersion: v1
kind: Service
metadata:
# The name must be equal to KubernetesConnectionConfiguration.serviceName
name: ignite-service
# The name must be equal to KubernetesConnectionConfiguration.namespace
namespace: ignite
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
service.beta.kubernetes.io/aws-load-balancer-type: nlb
labels:
app: ignite
spec:
type: LoadBalancer
ports:
- name: rest
port: 8080
targetPort: 8080
- name: thinclients
port: 10800
targetPort: 10800
# Optional - remove 'sessionAffinity' property if the cluster
# and applications are deployed within Kubernetes
# sessionAffinity: ClientIP
selector:
# Must be equal to the label set for pods.
app: ignite
status:
loadBalancer: {}
我遇到过这样的情况:我部署了ELB,但这次是NLB,但它不会破坏以前的ELB。
有没有办法在应用k8s清单时,删除AWS上的旧负载平衡器?
1条答案
按热度按时间erhoui1w1#
不确定您使用什么来创建资源helm、resources或kubectl,但从现在开始考虑kubectl
您可以使用