Closed creativefre closed 3 years ago
I will ask the team to look into your issue. As far as changing domain.yaml file do you think it has anything to do with REST certification issue or it is independent?
Can you set operator debug to FINE or FINER and post the log here when you see the problem?
One potential workaround to try is to kill the operator pod and see if the re-create pod will solve your problem. Before doing that could you gather the following info:
I'm not sure the domain.yaml has something to do with the rest certification issue. On other occasions after some time (a few hours) I also had instability problems. Pods just failed and did not restart. Apart from that, I've setup the operator with javaLoggingLevel=FINEST and the operator was logging With FINEST. When I enable the REST api. The operator pod recreates it self and goes back to javaLoggingLevel=INFO even when I've set it to FINEST. So for the moment it's not possible to give that logging information.
After enabling the REST API Current helm chart Kubernetes Dashboard operator pod info
Now the REST API is reachable but no domains are given back like before. When I apply a new domain.yaml config with an extra managed server. Nothing happens.
Even when I recreate the pod with helm, the logging level stays on INFO
helm upgrade --reuse-values --set javaLoggingLevel=FINEST --wait weblogic-operator /scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator
I'm not sure if this is the operator config map that you mean.
I cannot see the exact steps you did so maybe you can simply answer the question I was looking for... After you updated the domain namespace did you restart the operator pod and then did you still have issue of getting the domain thru REST?
Yes, my exact steps are beginning from a kubernetes without the weblogic operator.
First I execute my setup script (First comment). Everything works fine after this.
After that I execute the following code to enable the rest API (Also in the first comment)
echo "externalRestEnabled: true" > /scratch/my_cert_values.yaml
bash /scratch/weblogic-kubernetes-operator/kubernetes/samples/scripts/rest/generate-external-rest-identity.sh \
-a "DNS:lnx-stage01.bryxx.eu,IP:172.17.0.11" \
-n weblogic-operator-ns -s weblogic-operator-identity >> /scratch/my_cert_values.yaml
#
#
#After the following step, the operator starts to act weird and restarts
#
#
helm install /scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator --name my-operator \
--namespace weblogic-operator-ns --values /scratch/my_cert_values.yaml --wait
helm upgrade \
--reuse-values \
--set "externalRestEnabled=true" \
--set "externalRestIdentitySecret=weblogic-operator-identity" \
--wait \
weblogic-operator \
/scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator
So I don't say to restart the pod, but it restarts itself for some reason
After that I tried to restart the pod manually with: (The --recreate-pods was ,missing in my previous post but I did execute it)
helm upgrade --reuse-values --recreate-pods --set javaLoggingLevel=FINEST --wait weblogic-operator /scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator
And the issue with the REST api remains. Hopefully this is more clear? On which steps I took to enable the REST api.
Else let met know! Thanks for the reply
I can see from the helm chart you showed above the "targetNamespaces: default" is not the correct value. Could you shutdown everything and start it again and this time first update the helm chart (e.g. the value yaml) with the desired target namespace and then run helm install and then show the configmap and verify REST command?
Hello thanks for helping me. I found the solution, I executed a wrong command.
I installed the weblogic operator with custom values in my install script. But when I enabled the operator there was also a step in the documentation to reinstall the operator with the my_cert_values.yaml.
Because I already installed the operator I only needed to update and recreate the pods. So this step was not neceserry, It reinstalls the operator with the default values in the yaml file.
helm install /scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator --name my-operator \
--namespace weblogic-operator-ns --values /scratch/my_cert_values.yaml --wait
I only needed to execute these steps to enable the external REST api.
bash /scratch/weblogic-kubernetes-operator/kubernetes/samples/scripts/rest/generate-external-rest-identity.sh \
-a "DNS:lnx-stage01.bryxx.eu,IP:172.17.0.11" \
-n weblogic-operator-ns -s weblogic-operator-identity
helm upgrade \
--reuse-values --recreate-pods \
--set "externalRestEnabled=true" \
--set "externalRestIdentitySecret=weblogic-operator-identity" \
--wait \
weblogic-operator \
/scratch/weblogic-kubernetes-operator/kubernetes/charts/weblogic-operator
You can close this issue now.
so when did you set domainNamespaces now?
I already set the domainNamespaces in my setup script.
echo "installing the operator in $operatorNS ..."
helm install ${weblKubOpPath}kubernetes/charts/weblogic-operator \
--name $operatorName \
--namespace $operatorNS \
--set image=oracle/weblogic-kubernetes-operator:2.1 \
--set serviceAccount=$serviceAcc \
--set elkIntegrationEnabled=true \
--set "domainNamespaces={}" \
--wait
#prepare for domain
echo "Creating namespace $domainNS ..."
kubectl create namespace $domainNS
echo "Set the operator to control the namespace $domainNS ..."
helm upgrade \
--reuse-values \
--set "domainNamespaces={"$domainNS"}" \
--wait \
weblogic-operator \
${weblKubOpPath}kubernetes/charts/weblogic-operator
I'm assuming the issue is resolved by now: from what I can tell, it may have been left open by @rjeberhard as a reminder to enhance the documentation. Feel free to re-open the issue if I'm incorrect.
Global info: Operating system: Ubuntu 18.04 LTS Kubernetes setup: 1 master and 2 workers Operating version: v2.1
I've succesfully setup the weblogic operator on kubernetes with 1 admin server and 2 managed servers running. My setup script
After that I've created a self signed certificate and enabled the rest api in the operator configuration
When I request to get all the domains of the operator, I don't get any domains in the items list.
Also I noticed that the operator does not respond after a while, for example when I change the domain.yaml file to add a new server to the cluster and apply it with kubectl apply -f domain.yaml. Nothing happens and no extra managed server is spinned up.
Any solutions on why I don't get the domains in the REST api call?