3 Reporting Oracle Cloud Native Environment Details
You can query the status of the environment, including such items as the installed modules, the configuration of specific hosts in a Kubernetes cluster, and so on, using the Platform CLI. This information can be useful for reporting status and for troubleshooting purposes.
The following sections contain information about reporting information about the environments, installed modules, and their associated properties.
Reporting Environment Information
To obtain general information about the environment and a summary of its modules, you can
use the olcnectl module report
or olcnectl environment
report
commands along with the --environment-name
option to
specify the environment you want information about, such as the following:
olcnectl module report \
--environment-name myenvironment
or
olcnectl environment report \
--environment-name myenvironment
Environment details included in the response depend on the modules you have installed. Responses include information about each installed module, their status, and other related information. For example, response might include:
-
Deployed Kubernetes module, including information such as cluster name and status such as:
-
The Kubernetes cluster name.
-
The status of pod networking.
-
The health status of the cluster.
-
-
Cluster Node IP addresses, port numbers, and status information such as:
-
Networking status.
-
kubecfg
file status. -
SELinux status.
-
Swap status.
-
IP connectivity status.
-
-
Other Installed modules including Helm chart details relating to each module.
Reporting Detailed Module Information
To isolate the summary information about specific modules in the environment, use the
olcnectl module report
command with the --environment-name
and --name
options to specify a module name. Only one module can be specified
at a time. For example, the following command returns information about the Kubernetes
cluster:
olcnectl module report \
--environment-name myenvironment \
--name mycluster
To obtain detailed information about a specific module (if the module has more detailed
information) in the environment, you can add the --children
option:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--children
In this example, the results returns a table listing information such as:
-
The summary module information included in the command without the
--children
option. -
Details for each node such as:
-
IP address, port number, and connectivity status.
-
Container images available.
-
Firewall settings such as open ports.
-
Kernel versions.
-
IP Interfaces.
-
Swap status.
-
Packages installed and corresponding version numbers.
-
Services running on the node.
-
Filtering Report Responses
To filter responses such that only specified properties are returned, you can use the
olcnectl module report
command along with the --include
option. For example, the following command returns only Kubernetes package details and version
numbers:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--children \
--include "package"
To return one or more properties, use the
--include
option followed by a comma separated
list of each property you want to return. For example, the
following returns information about the state of a cluster and the
services running on each node in the cluster:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--children \
--include "service","status_check"
You can also exclude certain properties from the response using
the --exclude
option. For example, the
following excludes only the kernel and IPS information from the
response:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--children \
--exclude "kernel","ips"
Changing Report Format
The default format for returned information is the table format. For example:
olcnectl module report \
--environment-name myenvironment \
--name mycluster
Displays output similar to:
╭────────────────────┬───────────────╮
│ myenvironment │ │
├────────────────────┼───────────────┤
│ mycluster │ │
├────────────────────┼───────────────┤
│ Property │ Current Value │
├────────────────────┼───────────────┤
│ status_check │ healthy │
│ kubectl │ │
│ kubecfg │ file exist │
│ podnetworking │ running │
│ externalip-webhook │ running │
╰────────────────────┴───────────────╯
To return responses in YAML format, use the --format yaml
option. For
example:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--format yaml
Displays output similar to:
Environments:
myenvironment:
ModuleInstances:
- Name: mycluster
Properties:
- Name: kubecfg
Value: file exist
- Name: podnetworking
Value: running
- Name: externalip-webhook
Value: running
- Name: status_check
Value: healthy
- Name: kubectl
You can also redirect the YAML format output of the responses to a file by using a right
angle bracket >
followed by a file name. For example:
olcnectl module report \
--environment-name myenvironment \
--name mycluster \
--format yaml \
> cluster_summary.yaml
The contents of the response can be viewed in the file.