要在AWS负载均衡器中忽略ingress-nginx中的证书,可以通过在目标组中配置安全监听器,并将其与负载均衡器关联来实现。以下是使用AWS CLI的解决方法的示例代码:
aws ec2 create-security-group --group-name my-security-group --description "My security group"
aws ec2 authorize-security-group-ingress --group-id --protocol tcp --port 80 --cidr 0.0.0.0/0
aws elbv2 create-target-group --name my-target-group --protocol HTTP --port 80 --vpc-id --health-check-protocol HTTP --health-check-path /health-check
aws elbv2 create-listener --load-balancer-arn --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn=
请注意,上述代码中的
、
、
和
应替换为实际的值。
通过上述步骤,您可以创建一个安全监听器,并将其与负载均衡器关联。这样,负载均衡器就可以忽略ingress-nginx中的证书。