Download presentation
Presentation is loading. Please wait.
1
Testing inside of Kubernetes and Openshift
Yegor Maksymchuk, Soft Serve, Ukraine Testing inside of Kubernetes and Openshift
2
Agenda Radanalytics.io Benefits of Openshift
Automation of deployment in Openshift Fabric8-kubernetes-client, XTF, radanalytics-utils as libraries for Java
3
whoami Yegor Maksymchuk Senior AQC engineer, Soft Serve Ukraine
GitHub: YegorMaksymchuk LinkedIn: ymaksymchuk
4
Data Science in the Cloud
5
OSHINKO Why ? Integration with Apache Spark in the Openshift.
Usability on UI and API level, it should be easy to use. OSHINKO
6
Example oc cluster up oc new-project xpdays-demo
oc create -f oc create -f oc new-app oshinko-webui oshinko create xpdays-spark-cluster oshinko get xpdays-spark-cluster oc new-app --template=$namespace/apache-zeppelin-openshift \ param=APPLICATION_NAME=apache-zeppelin \ param=GIT_URI= \ param=ZEPPELIN_INTERPRETERS=md
7
Problems More than 10 application under test.
Tests should not be run, in case bad deployment. All application works in Openshift.
8
Solutions Possible solutions: Our choice: Bash scripts Java
Ansible scripts Jenkins Openshift plugin Java or Python for tests Our choice: Java Fabric8-k8s-client Kubernetes and Openshift Rest API
9
Kubernetes: Architecture
10
Kubernetes:POD apiVersion: v1 kind: Pod metadata: name: pod-demo
labels: spec: containers: - name: pod-demo image: yemax/pod-demo:1 ports: - containerPort: 8081 Base entity inK8s. It is group of one or more containers with shared storage/network, and a specification for how to run the containers. Containers within a pod share an IP address and port space, and can find each other via localhost.
11
Kubernetes:Namespace
{ "kind": "Namespace", "apiVersion": "v1", "metadata": { "name": "development", "labels": { "name": "development" } Namespace - grouping entities, provide shared resources. Not security K8s user see all nemaspace. Node same as workers same as Minions - it vm or physical servers, what managed be k8s master.
12
Kubernetes: Replica Sets
ReplicaSet is the next-generation Replication Controller. The only difference between a ReplicaSet and a Replication Controller right now is the selector support. ReplicaSet supports the new set-based selector requirements as described in the labels user guide whereas a Replication Controller only supports equality-based selector requirements. About labels and selectors, we will talk later when starting with deployment from java code demo.
13
K8s: Deployment DC - it is main entity what responsible for creation a Replica Set, and include information about what POD should be created by RS.
14
Kubernetes: Ingress This entity responsible for a connect external traffic to service. It is a Ngenix WebServer with special rule suite. Or An Ingress is a collection of rules that allow inbound connections to reach the cluster services.
15
Openshift
18
Openshift
20
Openshift
22
s2i-lighttpd/ Dockerfile – This is a standard Dockerfile where we’ll define the builder image Makefile – a helper script for building and testing the builder image test/ run – test script, testing if the builder image works correctly test-app/ – directory for your test application .s2i/bin/ assemble – script responsible for building the application run – script responsible for running the application save-artifacts – script responsible for incremental builds, covered in a future article usage – script responsible for printing the usage of the builder image
23
Fabric8
24
Fabric8 Fabric8 maven plugin Fabric8 Platform for Dev\Testing and CI
25
Fabric8
27
Fabric8
28
Useful materials:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.