Table of Contents
@MIGU 补充相关内容
Introduction
The purpose of this test is to demonstrate two scheduling use cases of text sentiment analysis service:
...
Test Framework
Hardware:
Control-panalpanel: 192.168.30.12,192.168.30.21
Worker-Cluseter1: Cluster1: 192.168.30.5 、192.168.30.22、192.168.30.20
Worker-Cluseter2: Cluster2: 192.168.30.2、192.168.30.16、192.168.30.25
Software:
Karmada: V1.4.0, Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
...
2.Create nginx deployment yaml file.
Create a deployment and name it sentiment. Execute commands as follow:
kubectl --kubeconfig /etc/karmada/karmada-apiserver.config create -f deployment.yaml |
3. Create a distribution yaml file, PropagationPolicy.yaml:
apiVersion: policy.karmada.io/v1alpha1 kind: PropagationPolicy metadata: name: sentiment-propagation spec: resourceSelectors: - apiVersion: apps/v1 kind: Deployment name: sentiment placement: clusterAffinity: clusterNames: - member1 - member2 replicaScheduling: replicaDivisionPreference: Weighted replicaSchedulingType: Divided weightPreference: staticWeightList: - targetCluster: clusterNames: - member1 weight: 1 - targetCluster: clusterNames: - member2 weight: 1 |
4.Create PropagationPolicy that will propagate distribute sentiment to worker cluster
We need to create a policy to propagate distribute the deployment to our member worker cluster. Execute commands as follow:
...
7.Retry, Check the deployment status
We can check deployment status, don't need to access member cluster. Execute commands as follow:
in In worker cluseter,we can see results the result as follow:
Case 2. Rescheduling
...
# get the pod in cluster worker1 $ kubectl --context worker1 get pod No resources found in default namespace. # get a list of pods in cluster worker2 $ kubectl --context worker2 get pod NAME READY STATUS RESTARTS AGE sentiment-6fd4c7867c-hvzfd 1/1 Running 0 6m3s sentiment-6fd4c7867c-vrmnm 1/1 Running 0 4s |
Test Dashboards
N/A
Additional Testing
N/A
Bottlenecks/Errata
...