Use the Administration Console
Contents
Introduction
You can access the WebLogic Server Administration Console external to the Kubernetes cluster using the following approaches:
NOTES:
-
For production use cases, Oracle recommends using a load balancer with ingress path routing rules and an SSL port to access the WebLogic Server Administration Console.
-
To verify that your load balancer, NodePort, or
kubectl port-forwardsetup is working as expected, see Test . -
Do not use the WebLogic Server Administration Console to start or stop servers, or for scaling clusters. See Starting and stopping servers and Scaling .
-
If your domain home type is either Domain in Image or Model in Image , then do not use the Administration Console to make changes to the WebLogic domain configuration because these changes are ephemeral and will be lost when servers restart. See Choose a domain home source type .
Warning
Externally exposing administrative, RMI, or T3 capable WebLogic channels
using a Kubernetes NodePort, load balancer,
port forwarding, or a similar method can create an insecure configuration.
For more information, see
External network access security
.
Use a load balancer
To access the WebLogic Server Administration Console through a load balancer, first set up an Ingress . This, in combination with SSL, is the best practice approach for production use cases.
Note
The following path-routing ingress instructions do not apply when you need to concurrently access multiple domains in the same Kubernetes cluster through the same external load balancer port. For the multiple domain use case, see the
Host-based routing
sample and make sure that the host names are resolvable by your DNS server (for example, domain1.org and domain2.org in the sample).
Configure ingress path routing rules for a non-SSL port
The following example sets up an ingress path routing rule to access a WebLogic Server Administration Console through a non-SSL port.
-
Set up a
path-routingYAML file for a Traefik load balancer: -
To access the WebLogic Server Administration Console, open the following URL from your browser:
Where:
-
${HOSTNAME}is where the ingress load balancer is running. -
To determine the
${LB_PORT}when using a Traefik load balancer:$ export LB_PORT=$(kubectl -n traefik get service traefik-operator -o jsonpath='{.spec.ports[?(@.name=="web")].nodePort}')
-
If you have an
FMW Infrastructure
domain, then you can add an ingress path routing rule for the PathPrefix /em and access Fusion Middleware Control (Enterprise Manager) using the following URL:
Configure ingress path routing rules for an SSL port and enable WebLogic Plugin Enabled
The following example sets up load balancer routing for access to the WebLogic Server Administration Console through an SSL port.
-
Enable the
WebLogic Plugin Enabledsetting in the WebLogic configuration:The WebLogic configuration setting
WebLogic Plugin Enabled, when set totrue, informs WebLogic Server about the presence of a load balancer proxy. Failure to have this setting enabled causes unexpected results in cases where the client IP address is required or when SSL terminates at the load balancer.When using WDT to configure a WebLogic domain, use the resource section at the domain level in a model YAML file:
When using a
WLSTscript to configure a WebLogic domain, use these commands: -
Configure an ingress path routing rule and update the ingress resource with a
customRequestHeadersvalue:For example, see the following
path-routingYAML file for a Traefik load balancer. In the case of SSL termination, Traefik must pass a custom headerWL-Proxy-SSL:trueto the WebLogic Server endpoints. -
Access the WebLogic Server Administration Console using the HTTPS port:
Get the SSL port from the Kubernetes service:
From your browser, use the following URL to access the WebLogic Server Administration Console:
If you have an FMW Infrastructure domain, then you can add an ingress path routing rule for the PathPrefix
/emand access Fusion Middleware Control (Enterprise Manager) using the following URL:
Use an Administration Server NodePort
Use the following steps to configure a NodePort to access the WebLogic Server Administration Console:
-
Update the WebLogic Administration Server configuration to add a Network Access Point (custom channel) with the HTTP protocol, and expose this channel on a NodePort service using the
domain.spec.adminServer.adminService.channelsattribute.For an example of setting up the
NodePorton an Administration Server, see Use aNodePort. For information about theNodePortService on an Administration Server, see the Domain resource document. -
From your browser, use the following URL to access the WebLogic Server Administration Console:
The
adminserver-NodePortis the port number of the Administration Server outside the Kubernetes cluster.If you have an FMW Infrastructure domain, then you can also access Fusion Middleware Control (Enterprise Manager) using the following URL:
Use a kubectl port-forward connection
A Kubernetes port forward command is convenient for development use cases but is not recommended for production use cases. It creates a local process external to a Kubernetes cluster that accepts external traffic on a dedicated local port and forwards this traffic to a specific pod and port in the Kubernetes cluster. If you have multiple domains, then each domain will require its own dedicated port forward command and a separate local port.
-
Forward a local port (that is external to Kubernetes) to the administration port of the Administration Server Pod according to these instructions .
NOTE: If you plan to access the WebLogic Server Administration Console from a browser on a different machine than the port forwarding command, then the port forwarding command needs to specify an
--addressparameter with an externally accessible IP address for the machine that is running the command. -
In the browser, use the following URL:
Where:
-
${HOSTNAME}is the DNS address or the IP address of the machine where thekubectl port-forwardcommand is running. This is customizable using the--addressparameter and islocalhostor127.0.0.1, by default. -
${LOCAL_PORT}is the local port specified on thekubectl port-forwardcommand line.
If you have an FMW Infrastructure domain, then you can also access Fusion Middleware Control (Enterprise Manager) using the following URL:
-
Test
To verify that your WebLogic Server Administration Server URL is correct, and to verify that that your load balancer,
NodePort, or kubectl port-forward are working as expected, run the following curl command at the same location as your browser:
If successful, then you will see the Connection succeeded message in the output from the command.