Remove T3/T3S Configuration
Remove the custom T3/T3S channels and their NodePort services from the Administration Server and managed servers.
The managed-server steps remove the custom channels created in Expose T3/T3S for Managed Servers.
Administration Server
- Create
t3_admin_delete.pywith the following content:admin_pod_name = sys.argv[1] admin_port = sys.argv[2] user_name = sys.argv[3] password = sys.argv[4] AdminServerName = sys.argv[5] channelType = sys.argv[6] print('custom admin_pod_name : [%s]' % admin_pod_name); print('custom admin_port : [%s]' % admin_port); print('custom user_name : [%s]' % user_name); print('custom password : ********'); connect(user_name, password, 't3://' + admin_pod_name + ':' + admin_port) edit() startEdit() cd('/') cd('Servers/%s/' % AdminServerName ) if channelType == 't3': delete('T3Channel_AS','NetworkAccessPoint') elif channelType == 't3s': delete('T3SChannel_AS','NetworkAccessPoint') else: print('channelType [%s] not supported',channelType) activate() disconnect() - Copy
t3_admin_delete.pyto the domain home in the Administration Server pod.For example, copy the script to
/u01/oracle/user_projects/domains/soainfrain thesoainfra-adminserverpod in thesoansnamespace:kubectl cp t3_admin_delete.py soans/soainfra-adminserver:/u01/oracle/user_projects/domains/soainfra - Use
kubectl execto runwlst.sh t3_admin_delete.pyin the Administration Server pod.Use the following command syntax:
kubectl exec -it <Administration Server pod> -n <namespace> -- /u01/oracle/oracle_common/common/bin/wlst.sh <domain_home>/t3_admin_delete.py <Administration Server pod> <Administration Server port> weblogic <password for weblogic> <AdminServerName> <protocol t3 or t3s>The following example uses these parameter values:
admin_pod_namesoainfra-adminserver: The Administration Server pod.admin_port7001: The Administration Server port.user_nameweblogic.passwordWelcome1: The example WebLogic password.AdminServerNameAdminServer: The Administration Server name.channelTypet3: The channel protocol.
kubectl exec -it soainfra-adminserver -n soans -- /u01/oracle/oracle_common/common/bin/wlst.sh /u01/oracle/user_projects/domains/soainfra/t3_admin_delete.py soainfra-adminserver 7001 weblogic Welcome1 AdminServer t3 - Delete the NodePort service for port
30014:kubectl delete -f t3_admin_svc.yaml
Managed servers
- Create
t3_ms_delete.pywith the following content:admin_pod_name = sys.argv[1] admin_port = sys.argv[2] user_name = sys.argv[3] password = sys.argv[4] managedNameBase = sys.argv[5] ms_count = sys.argv[6] channelType = sys.argv[7] print('custom host : [%s]' % admin_pod_name); print('custom port : [%s]' % admin_port); print('custom user_name : [%s]' % user_name); print('custom password : ********'); connect(user_name, password, 't3://' + admin_pod_name + ':' + admin_port) edit() startEdit() for index in range(0, int(ms_count)): cd('/') msIndex = index+1 cd('/') name = '%s%s' % (managedNameBase, msIndex) cd('Servers/%s/' % name ) if channelType == 't3': delete('T3Channel_MS','NetworkAccessPoint') elif channelType == 't3s': delete('T3SChannel_MS','NetworkAccessPoint') else: print('Protocol [%s] not supported' % channelType) activate() disconnect() - Copy
t3_ms_delete.pyto the domain home in the Administration Server pod.For example, copy the script to
/u01/oracle/user_projects/domains/soainfrain thesoainfra-adminserverpod in thesoansnamespace:kubectl cp t3_ms_delete.py soans/soainfra-adminserver:/u01/oracle/user_projects/domains/soainfra - Use
kubectl execto runwlst.sh t3_ms_delete.pyin the Administration Server pod.Use the following command syntax:
kubectl exec -it <Administration Server pod> -n <namespace> -- /u01/oracle/oracle_common/common/bin/wlst.sh <domain_home>/t3_ms_delete.py <Administration Server pod> <Administration Server port> weblogic <password for weblogic> <t3 port on Managed Server> <t3 nodeport> <master_ip> <managedNameBase> <ms_count> <channelType t3 or t3s>The following example uses these parameter values:
admin_pod_namesoainfra-adminserver: The Administration Server pod.admin_port7001: The Administration Server port.user_nameweblogic.passwordWelcome1: The example WebLogic password.managedNameBasesoa_server: The managed server base name. Forosb_cluster, useosb_server.ms_count5: The number of configured managed servers.channelTypet3: The channel protocol. Uset3ort3s.
kubectl exec -it soainfra-adminserver -n soans -- /u01/oracle/oracle_common/common/bin/wlst.sh /u01/oracle/user_projects/domains/soainfra/t3_ms_delete.py soainfra-adminserver 7001 weblogic Welcome1 soa_server 5 t3 - Delete the NodePort service for port
30016(or the NodePort used when creating the Kubernetes service):kubectl delete -f t3_ms_svc.yaml