title | description |
---|---|
Steampipe Table: openshift_route - Query OpenShift Routes using SQL |
Allows users to query OpenShift Routes, providing insights into the route objects that define the desired host for externally-reachable services. |
OpenShift Routes is a resource within Red Hat OpenShift that helps expose a service at a host name, like www.example.com, so that external clients can reach it by name. It provides a way to aggregate multiple services under the same IP address and differentiate them with the host name. OpenShift Routes makes it easy to expose services to the internet and manage traffic to your applications.
The openshift_route
table provides insights into the route objects within Red Hat OpenShift. As a DevOps engineer, you can explore route-specific details through this table, including the host, path, and the associated services. Utilize it to manage and monitor the accessibility of your applications, ensuring they are reachable and functioning as expected.
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route;
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route;
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
namespace = 'default';
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
namespace = 'default';
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
deletion_timestamp is not null;
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
deletion_timestamp is not null;
select
uid,
name,
namespace,
jsonb_pretty(ingress) as ingress
from
openshift_route;
select
uid,
name,
namespace,
ingress
from
openshift_route;
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
spec_to ->> 'kind' = 'Service'
and spec_to ->> 'name' = 'console';
select
uid,
name,
path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route
where
json_extract(spec_to, '$.kind') = 'Service'
and json_extract(spec_to, '$.name') = 'console';
select
uid,
name,
or.path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route as or,
jsonb_array_elements(owner_references) owner
where
owner ->> 'kind' = 'daemonset'
and owner ->> 'name' = 'ingress-canary';
select
uid,
name,
osr.path,
host,
creation_timestamp,
resource_version,
namespace
from
openshift_route as osr,
json_each(owner_references) as owner
where
json_extract(owner.value, '$.kind') = 'daemonset'
and json_extract(owner.value, '$.name') = 'ingress-canary';