mirror of
https://github.com/nclabteam/THPA.git
synced 2025-02-12 10:31:54 +00:00
- Add memo for experimental setup.
- Add deployment file for application deployment.
This commit is contained in:
parent
0cc78fbb9a
commit
082bfce7c7
3 changed files with 57 additions and 2 deletions
|
@ -41,4 +41,4 @@ we need to modify these:
|
||||||
|
|
||||||
- For scheduler-extender: https://github.com/nclabteam/k8s-scheduler-extender-example.git
|
- For scheduler-extender: https://github.com/nclabteam/k8s-scheduler-extender-example.git
|
||||||
|
|
||||||
|
- Please check experimental_setup.txt for configuring testbed
|
||||||
|
|
45
app/deployment.yaml
Normal file
45
app/deployment.yaml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: app-example1
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: app-example1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: app-example1
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: app-example1
|
||||||
|
image: nguyennd1995/simpleapp_200
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "50m"
|
||||||
|
memory: "32Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "150m"
|
||||||
|
memory: "128Mi"
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: app-example1
|
||||||
|
labels:
|
||||||
|
app: app-example1
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: app-example1
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
nodePort: 30006
|
||||||
|
type: NodePort
|
||||||
|
|
|
@ -15,7 +15,17 @@
|
||||||
|
|
||||||
+ Switch kube-proxy to ipvs mode
|
+ Switch kube-proxy to ipvs mode
|
||||||
|
|
||||||
*** Note *** Traffic gen scripts must be executed on traffic gen machine
|
+ App to deploy can be found in app/ directory
|
||||||
|
|
||||||
|
+ HPA must be enabled for the depoyed application:
|
||||||
|
|
||||||
|
"kubectl autoscale deployment <application_deployment_name> --min=3 --max=12 --cpu-percent=80"
|
||||||
|
|
||||||
|
*** Note ***
|
||||||
|
|
||||||
|
+ Traffic gen scripts must be executed on traffic gen machine
|
||||||
|
|
||||||
|
+ Application on each node can be accessed using nodeip and port, e.g. 192.168.10.25:10000
|
||||||
|
|
||||||
- Section V_A - Evaluate 3 nodes
|
- Section V_A - Evaluate 3 nodes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue