# Using Application Load Balancer

## Integrate with ALB

### Deploy a ALB

#### Step 1: Create Deployment, Service type NodePort

```bash
kubectl create deployment httpbin --image=mccutchen/go-httpbin                  
kubectl expose deployment httpbin --name=httpbin-service --port=80 --target-port=8080 --type=NodePort
```

#### Step 2: Check the Deployment and Service information just deployed

#### Step 3: Create Ingress Resource

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-ingress
spec:
  ingressClassName: "vngcloud"
  defaultBackend:
    service:
      name: httpbin-service
      port:
        number: 80
  rules:
    - http:
        paths:
          - path: /4
            pathType: Exact
            backend:
              service:
                name: httpbin-service
                port:
                  number: 80
```

New annotations for NLB and ALB:

* `vks.vngcloud.vn/is-poc`: `true` or `false` (default: `false`). If `true`, the LoadBalancer will be created in the POC.
* `vks.vngcloud.vn/enable-autoscale`: `true` or `false` (default: `false`). If `true`, the LoadBalancer will be created with autoscale.
* `vks.vngcloud.vn/ignore`: `true` or `false` (default: `false`). If `true`, the operator will not manage the resource `Service` and `Ingress`. Any changes to the resource will be ignored and LoadBalancer will not be updated.

New annotations for ALB only:

* `vks.vngcloud.vn/implementation-specific-params`:
* `vks.vngcloud.vn/header`: `string`, default: "".
* `vks.vngcloud.vn/client-certificate-id`: `string`, default: "".


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vngcloud.vn/vng-cloud-document/vks/network/loadbalancer/alb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
