Create, view, update, and delete EgressPoints on Tanzu Spaces. See About egress in the Tanzu Platform for Kubernetes documentation.
tanzu space use
commandCLI plugin: egress
| Target: global
| Primarily used for: Platform operations | Release Notes
tanzu egress [command]
create Create an EgressPoint resource.
delete Delete an EgressPoint resource.
get Get the details of an EgressPoint resource.
list List all existing EgressPoint resources.
update Update an existing EgressPoint
Create an EgressPoint resource in the current Space.
tanzu egress create EP-NAME [FLAGS]
--host Destination host to enable egress traffic to.
--port Destination port to enable egress traffic to.
--protocol Protocol for egress traffic. Supported values are HTTP, HTTPS, TCP, and TLS.
--sourceRef App resources of specified types that can originate egress traffic, following the format `apps:[ContainerApp|Deployment]:[name]`.
Supported types are Deployment and ContainerApp.
Notes:
kubectl
to apply its YAML file spec or use the Tanzu Platform UI, as described in Manage egress rules.Create an EgressPoint ep-vmware
that enables HTTPS access to port 443 of machines hosted under vmware.com
:
tanzu egress create ep-vmware --host vmware.com --port 443 --protocol HTTPS
EgressPoint ep-vmware created.
Create an EgressPoint ep-for-app
that gives the ContainerApp
named my-app
HTTPS access to port 443 of machines hosted under vmware.com
.
tanzu egress create ep-for-app --host vmware.com --port 443 --protocol HTTPS --sourceRef apps:ContainerApp:my-app
Print the details of an EgressPoint in the current Space:
tanzu egress get EP-NAME
tanzu egress get ep-vmware
NAME PORT PROTOCOL HOST SOURCE REF
ep-vmware 443 HTTPS vmware.com
List all existing EgressPoints in the current Space:
tanzu egress list
tanzu egress list
NAME PORT PROTOCOL HOST SOURCE REF
ep-vmware 443 HTTPS vmware.com
ep-vmware-http 80 HTTP vmware.com
Delete an EgressPoint from the current Space:
tanzu egress delete EP-NAME
tanzu egress delete ep-vmware
Deleted EgressPoint 'ep-vmware-http'
Update an EgressPoint from the current Space.
tanzu egress update EP-NAME [FLAGS]
--host Destination host to enable egress traffic to.
--port Destination port to enable egress traffic to.
--protocol Protocol for egress traffic. Supported values are HTTP, HTTPS, TCP, and TLS.
--sourceRef App resources of specified types that can originate egress traffic, following the format apps:[ContainerApp|Deployment]:[name].
Supported types are Deployment and ContainerApp.
tanzu egress update ep-vmware --host broadcom.com
EgressPoint ep-vmware-http updated.
The Tanzu CLI lacks access to the current Space.
Try some basic tanzu space
against the Space to verify access.
Please file a support ticket describing the steps that you took before encountering this bug.
Only integers are accepted for port.
Ensure you use a whole number for this flag and not floats such as 80.
or 80.0
.
Ensure that you have formatted your sourceRef
value as described above.
tanzu egress delete
and tanzu egress get
fail when an EgressPoint does not exist.
Run tanzu egress list
to check the spelling of the EgressPoint name.
tanzu egress update
fails when attempting to update an EgressPoint with no targets (i.e. an empty egress point).
Delete the EgressPoint and recreate it with at least one target before using the update command on it.
tanzu egress update
fails when attempting to update an EgressPoint with multiple hosts. The CLI does not support updating EgressPoint objects with multiple hosts or because it cannot disambiguate their ordering.
Update the EgressPoint by using kubectl
to edit and apply its YAML file spec.
tanzu egress update
fails when inputs are not valid.
See EgressPoint API Reference for more information on valid hosts, ports, sourceRef and protocols.