Created
October 17, 2023 19:41
-
-
Save dombisza/6cec70d5568357353dc12c5c59595d20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###terraform | |
resource "opentelekomcloud_vpc_eip_v1" "this_lb" { | |
publicip { | |
type = "5_bgp" | |
} | |
bandwidth { | |
name = "${local.prefix}-lb-eip" | |
size = 8 | |
share_type = "PER" | |
charge_mode = "traffic" | |
} | |
} | |
resource "opentelekomcloud_lb_loadbalancer_v3" "this" { | |
name = "sdombi-dlb" | |
router_id = opentelekomcloud_vpc_subnet_v1.this.vpc_id | |
network_ids = [opentelekomcloud_vpc_subnet_v1.this.network_id] | |
vip_address = "10.110.10.222" | |
subnet_id = opentelekomcloud_vpc_subnet_v1.this.subnet_id | |
availability_zones=["eu-de-01"] | |
public_ip { | |
id = opentelekomcloud_vpc_eip_v1.this_lb.id | |
} | |
} | |
## kube svc | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
annotations: | |
kubernetes.io/elb.class: performance | |
kubernetes.io/elb.id: d233c8af-2264-46cc-9aaa-71ebbb237ba5 | |
kubernetes.io/elb.mark: "0" | |
creationTimestamp: "2023-10-17T19:33:09Z" | |
finalizers: | |
- service.kubernetes.io/load-balancer-cleanup | |
labels: | |
app: nginx | |
name: nginx-svc | |
namespace: default | |
resourceVersion: "199177" | |
uid: 33bd5a24-562c-450d-8588-3a15f024532c | |
spec: | |
allocateLoadBalancerNodePorts: true | |
clusterIP: 10.247.205.5 | |
clusterIPs: | |
- 10.247.205.5 | |
externalTrafficPolicy: Cluster | |
internalTrafficPolicy: Cluster | |
ipFamilies: | |
- IPv4 | |
ipFamilyPolicy: SingleStack | |
loadBalancerIP: 10.110.10.222 | |
ports: | |
- name: cce-service-0 | |
nodePort: 30743 | |
port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: nginx | |
sessionAffinity: None | |
type: LoadBalancer | |
status: | |
loadBalancer: | |
ingress: | |
- ip: 10.110.10.222 | |
- ip: 80.158.53.176 | |
❯ curl 80.158.53.176 | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Welcome to nginx!</title> | |
<style> | |
body { | |
width: 35em; | |
margin: 0 auto; | |
font-family: Tahoma, Verdana, Arial, sans-serif; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Welcome to nginx!</h1> | |
<p>If you see this page, the nginx web server is successfully installed and | |
working. Further configuration is required.</p> | |
<p>For online documentation and support please refer to | |
<a href="http://nginx.org/">nginx.org</a>.<br/> | |
Commercial support is available at | |
<a href="http://nginx.com/">nginx.com</a>.</p> | |
<p><em>Thank you for using nginx.</em></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment