@Plugin(name="k8s",
category="Lookup")
public class KubernetesLookup
extends org.apache.logging.log4j.core.lookup.AbstractLookup
The supported keys are listed in the following table:
| Key | Description |
|---|---|
| the name of the account | |
| the annotations of the Kubernetes pod | |
| the id of the Kubernetes container | |
| the name of the Kubernetes container | |
| the host name of the Kubernetes pod | |
| the IP of the Kubernetes pod | |
| the id of the Kubernetes container image | |
| the name of the Kubernetes container image | |
| the labels of the Kubernetes pod | |
| "labels.<name>" | the value of the "<name>" label of the Kubernetes pod |
| the master URL of the Kubernetes cluster | |
| the annotations of the namespace | |
| the id of the namespace | |
| the labels of the namespace | |
| the name of the namespace | |
| the id of the pod | |
| the IP of the pod | |
| the name of the pod |
| Constructor and Description |
|---|
KubernetesLookup()
Default constructor, called by reflection.
|
| Modifier and Type | Method and Description |
|---|---|
protected io.fabric8.kubernetes.client.KubernetesClient |
createClient()
Creates a Kubernetes client used to retrieve K8S configuration.
|
String |
lookup(org.apache.logging.log4j.core.LogEvent event,
String key) |
public KubernetesLookup()
Copyright © 2015–2024 Red Hat. All rights reserved.