Class KubernetesLookup
- java.lang.Object
-
- org.apache.logging.log4j.core.lookup.AbstractLookup
-
- io.fabric8.kubernetes.log4j.lookup.KubernetesLookup
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.lookup.StrLookup
@Plugin(name="k8s", category="Lookup") public class KubernetesLookup extends org.apache.logging.log4j.core.lookup.AbstractLookupRetrieves various attributes from the Kubernetes server.The supported keys are listed in the following table:
Supported keys Key Description "accountName" the name of the account "annotations" the annotations of the Kubernetes pod "containerId" the id of the Kubernetes container "containerName" the name of the Kubernetes container "host" the host name of the Kubernetes pod "hostIp" the IP of the Kubernetes pod "imageId" the id of the Kubernetes container image "imageName" the name of the Kubernetes container image "labels" the labels of the Kubernetes pod "labels.<name>" the value of the "<name>" label of the Kubernetes pod "masterUrl" the master URL of the Kubernetes cluster "namespaceAnnotations" the annotations of the namespace "namespaceId" the id of the namespace "namespaceLabels" the labels of the namespace "namespaceName" the name of the namespace "podId" the id of the pod "podIp" the IP of the pod "podName" the name of the pod
-
-
Constructor Summary
Constructors Constructor Description KubernetesLookup()Default constructor, called by reflection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.fabric8.kubernetes.client.KubernetesClientcreateClient()Creates a Kubernetes client used to retrieve K8S configuration.Stringlookup(org.apache.logging.log4j.core.LogEvent event, String key)
-