Skip to content

Ingress

Bases: DuploTenantResourceV3

apply

Apply a Ingress

Create or Update a Ingress resource with Duplocloud cli.

CLI Usage

duploctl ingress apply -f 'ingress.yaml'
Contents of the ingress.yaml file
labels: null
annotations: null
lbConfig:
  listeners:
    https:
      - 443
    http:
      - 80
  dnsPrefix: "duploctl"
  isPublic: true
  certArn:
rules:
  - path: "/"
    pathType: "Prefix"
    serviceName: "nginx"
    port: 80
    host: "duploctl-nginx.duplocloud.net"
    portName: null
name: "duploctl"
ingressClassName: "alb"
otherSpecs:
  tls: []

Parameters:

Name Type Description Default
body BODY

The resource to apply.

required
wait WAIT

Wait for the resource to be created.

False
patches PATCHES

The patches to apply to the resource.

None

Returns:

Name Type Description
message dict

Success message.

create

Create an Ingress. Usage: CLI Usage

duploctl ingress create -f 'ingress.yaml'
Contents of the ingress.yaml file
labels: null
annotations: null
lbConfig:
  listeners:
    https:
      - 443
    http:
      - 80
  dnsPrefix: "duploctl"
  isPublic: true
  certArn:
rules:
  - path: "/"
    pathType: "Prefix"
    serviceName: "nginx"
    port: 80
    host: "duploctl-nginx.duplocloud.net"
    portName: null
name: "duploctl"
ingressClassName: "alb"
otherSpecs:
  tls: []
Example: One liner example
echo """
labels: null
annotations: null
lbConfig:
  listeners:
    https:
      - 443
    http:
      - 80
  dnsPrefix: "duploctl"
  isPublic: true
  certArn:
rules:
  - path: "/"
    pathType: "Prefix"
    serviceName: "nginx"
    port: 80
    host: "duploctl-nginx.duplocloud.net"
    portName: null
name: "duploctl"
ingressClassName: "alb"
otherSpecs:
  tls: []

""" | duploctl ingress create -f -
Args: body: The resource to create. Returns: dict: The created resource or success message.

delete

Delete a Ingress resource by name.

cli usage
duploctl ingress delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the Ingress resource to delete.

required

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the {{kind}} resource could not be found or deleted.

find

Find Ingress resources by name.

cli usage
duploctl ingress find <name>

Parameters:

Name Type Description Default
name NAME

The name of the Ingress resource to find.

required

Returns:

Name Type Description
resource dict

The Ingress object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

list

Retrieve a List of Ingress resources

cli usage
duploctl ingress list

Returns:

Name Type Description
list list

A list of Ingress.

update

Update an Ingress. Usage: CLI Usage

duploctl ingress update -f 'ingress.yaml'
Contents of the ingress.yaml file
labels: null
annotations: null
lbConfig:
  listeners:
    https:
      - 443
    http:
      - 80
  dnsPrefix: "duploctl"
  isPublic: true
  certArn:
rules:
  - path: "/"
    pathType: "Prefix"
    serviceName: "nginx"
    port: 80
    host: "duploctl-nginx.duplocloud.net"
    portName: null
name: "duploctl"
ingressClassName: "alb"
otherSpecs:
  tls: []
Example: One liner example
echo """
labels: null
annotations: null
lbConfig:
  listeners:
    https:
      - 443
    http:
      - 80
  dnsPrefix: "duploctl"
  isPublic: true
  certArn:
rules:
  - path: "/"
    pathType: "Prefix"
    serviceName: "nginx"
    port: 80
    host: "duploctl-nginx.duplocloud.net"
    portName: null
name: "duploctl"
ingressClassName: "alb"
otherSpecs:
  tls: []

""" | duploctl ingress update -f -
Args: body: The resource to update. Returns: dict: The updated resource or success message.