################################################################################################## # # This file has only been tested under minikube v1.21.0 # (with itsio 1.10.1 although that should not be needed; I just haven't tested without it) # # Usage # save this file as k8_mvs38j.yaml # gunzip docker_image_mvs38j_nje.tar.gz # you did download the image didn't you ? # minikube load docker_image_mvs38j_nje.tar # load the downloaded inage tar file into minikube cache # kubectl apply -f ./k8_mvs38j.yaml # # to logon to TSO # # WAIT 5 MINS FOR THE CONTAINER TO START # kubectl port-forward svc/mvs-mid1 -n mvs38j-demo 3270 # <<< this requires a dedicated terminal session # # (optional "dnf install x3270 x3250-text x3270-x11" if you do not have them) # x3270 -model 3279-2 localhost:3270 # on a second terminal session, the first is used for the port forward # # Stopping it # # just close the x3270 session # # just ctrl-c on the session used for port forwarding, that stops port forwarding # kubectl delete -f ./k8_mvs38j.yaml # # Debugging # kubectl get pods -n mvs38j-demo # kubectl exec -ti XXXX -n mvs38j-demo -c mvs-mid1 -- /bin/bash # (XXX is a pod id of the above command) # ################################################################################################## # Run in an isolated namespace apiVersion: v1 kind: Namespace metadata: name: mvs38j-demo labels: istio-injection: enabled --- apiVersion: v1 kind: Service metadata: name: mvs-mid1 namespace: mvs38j-demo labels: app: mvs-mid1 service: mvs-mid1 spec: ports: - port: 3270 protocol: TCP name: tso selector: app: mvs-mid1 --- apiVersion: v1 kind: ServiceAccount metadata: name: mvs-mid1-svcacct namespace: mvs38j-demo labels: account: mvs-mid1 --- apiVersion: apps/v1 kind: Deployment metadata: name: mvs-mid1-v1 namespace: mvs38j-demo labels: app: mvs-mid1 version: v1 spec: replicas: 1 selector: matchLabels: app: mvs-mid1 version: v1 template: metadata: namespace: mvs38j-demo labels: app: mvs-mid1 version: v1 spec: serviceAccountName: mvs-mid1-svcacct containers: - name: mvs-mid1 image: localhost/mvs38j imagePullPolicy: IfNotPresent env: - name: RUNNING_UNDER_K8S value: "YES" ports: - containerPort: 3270 securityContext: runAsUser: 6001 runAsGroup: 6001 ---