๐ก Karmada Multi-Cluster Kubernetes: Scheduling โ Executive Summary
Technical architectural analysis, practical configuration manifests, and deployment instructions for Karmada Multi-Cluster Kubernetes: Scheduling.
Related pages
Operation
karmada-apiserver
This is a control-plane running as a pod, and the deploy of the apiserver does not deploy the pod, but deploys the member cluster.
txt
kubectl config use-context karmada-apiserver
kubectl get deploy,pp,cpp -A
Query member cluster resources
txt
## ์ค์น๋ฐฉ์์ ๋ฐ๋ผ์ kubectl karmada, kubectl-karmada, karmadactl ๋ฑ์ผ๋ก ์ฌ์ฉ๋จ.
## ์๋์์๋ kubectl karmada๋ก ์์
## kubectl ๋ช
๋ น์ด์ ๋์ผํ๋ฉฐ, CLUSTER column์ด ์ถ๊ฐ๋จ
kubectl karmada get pods
kubectl karmada get deploy
kubectl karmada get svc -A ...
View member cluster log
txt
## ๋ฐ๋์ ํด๋ฌ์คํฐ๋ฅผ ์ง์ ํด์ผ ํจ
kubectl karmada get deploy nfs-pod-provisioner
>>>
NAME CLUSTER READY UP-TO-DATE AVAILABLE AGE ADOPTION
nfs-pod-provisioner cluster1 1/1 1 1 6d17h N
nfs-pod-provisioner cluster2 1/1 1 1 7d N
<<<
kubectl karmada logs deploy/nfs-pod-provisioner --cluster=cluster1 -f
Resource propagation policy settings and deployment propagation (example: deployment/nginx)
Resource Propagating | karmada
The deploy of a member cluster deployed in this way is recreated by karmada-scheduler even if it is deleted directly from the member
txt
#karmada apiserver ์ฌ์ฉ
kubectl config use-context karmada-apiserver
kubectl get clusters
kubectl apply -f propagationpolicy.yaml#์๋์ ์์ ์ฐธ์กฐ#kubectl get cpp #clusterpropagationpolicies.policy.karmada.io
kubectl get pp#propagationpolicies.policy.karmada.io
kubectl create ns karmada-test
kubectl create deploy nginx -n karmada-test --image=nginx --replicas=2
#karmada control-plane์์ ๋ฐฐํฌ ํ์ธ
kubectl get deploy -n karmada-test
>>>
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 2/2 2 2 16s
<<<
#๋ฉค๋ฒํด๋ฌ์คํฐ ๋ฐฐํฌ ํ์ธ
kubectl karmada get deploy -n karmada-test
>>>
NAME CLUSTER READY UP-TO-DATE AVAILABLE AGE ADOPTION
nginx cluster1 1/1 1 1 29s Y
nginx cluster2 1/1 1 1 29s Y
<<<
samples
propagationpolicy.yaml
https://github.com/karmada-io/karmada/blob/master/samples/nginx/propagationpolicy.yaml
txt
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: nginx-propagation
namespace: karmada-test
spec:
resourceSelectors:
- apiVersion: apps/v1
kind: Deployment
name: nginx
namespace: karmada-test
placement:
clusterAffinity:
clusterNames:
- cluster1
- cluster2
replicaScheduling:
replicaDivisionPreference: Weighted
replicaSchedulingType: Divided
weightPreference:
staticWeightList:
- targetCluster:
clusterNames:
- cluster1
weight: 1
- targetCluster:
clusterNames:
- cluster2
weight: 1
cpp.yaml
txt
apiVersion: policy.karmada.io/v1alpha1
kind: ClusterPropagationPolicy
metadata:
name: nginx-clusterpropagation
spec:
resourceSelectors:
- apiVersion: apps/v1
kind: Deployment
name: nginx
namespace: karmada-test2
placement:
clusterAffinity:
clusterNames:
- cluster1
- cluster2
replicaScheduling:
replicaDivisionPreference: Weighted
replicaSchedulingType: Divided
weightPreference:
staticWeightList:
- targetCluster:
clusterNames:
- cluster1
weight: 1
- targetCluster:
clusterNames:
- cluster2
weight: 1




Leave a Reply