add quickstart
This commit is contained in:
parent
73f34fe760
commit
13f6a7157b
62
README.md
62
README.md
|
@ -37,28 +37,76 @@ The following figure shows how Karmada resource relate to the objects created in
|
|||
|
||||

|
||||
|
||||
## Features
|
||||
## Quickstart
|
||||
|
||||
Please install [kind](https://kind.sigs.k8s.io/) and [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) before the following steps.
|
||||
|
||||
### Install karmada
|
||||
|
||||
1. Clone this repo to get karmada.
|
||||
|
||||
```
|
||||
git clone https://github.com/huawei-cloudnative/karmada
|
||||
```
|
||||
|
||||
## Guides
|
||||
2. Move to the karmada package directory.
|
||||
|
||||
### Quickstart
|
||||
```
|
||||
cd karmada
|
||||
```
|
||||
|
||||
3. Install karmada.
|
||||
|
||||
```
|
||||
export KUBECONFIG=/root/.kube/host.config
|
||||
hack/local-up-karmada.sh
|
||||
```
|
||||
|
||||
### User Guide
|
||||
4. Verify that karmada's component is deployed and running.
|
||||
|
||||
```
|
||||
kubectl get pods -n karmada-system
|
||||
```
|
||||
|
||||
### Join member cluster
|
||||
|
||||
### Development Guide
|
||||
1. Create **member cluster** for attaching it to karmada.
|
||||
|
||||
```
|
||||
hack/create-cluster.sh member /root/.kube/member.config
|
||||
```
|
||||
|
||||
2. Join member cluster to karmada using karmadactl.
|
||||
|
||||
## Community
|
||||
```
|
||||
make karmadactl
|
||||
./karmadactl join member --member-cluster-kubeconfig=/root/.kube/member.config
|
||||
```
|
||||
|
||||
3. Verify member cluster is Joined to karmada successfully.
|
||||
|
||||
```
|
||||
kubectl get membercluster -n karmada-cluster
|
||||
```
|
||||
|
||||
### Propagate application
|
||||
|
||||
1. Create nginx deployment in karmada.
|
||||
|
||||
```
|
||||
kubectl create -f samples/nginx/deployment.yaml
|
||||
```
|
||||
|
||||
2. Create PropagationPolicy that will propagate nginx to member cluster.
|
||||
|
||||
```
|
||||
kubectl create -f samples/nginx/propagationpolicy.yaml
|
||||
```
|
||||
|
||||
3. Verify the nginx is deployed successfully in **member cluster**.
|
||||
|
||||
```
|
||||
export KUBECONFIG=/root/.kube/member.config
|
||||
kubectl describe deploy nginx
|
||||
```
|
||||
|
||||
## Code of Conduct
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: nginx
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: propagationstrategy.karmada.io/v1alpha1
|
||||
kind: PropagationPolicy
|
||||
metadata:
|
||||
name: nginx-propagation
|
||||
spec:
|
||||
resourceSelector:
|
||||
- apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
names:
|
||||
- nginx
|
||||
namespaces:
|
||||
- default
|
||||
placement:
|
||||
clusterAffinity:
|
||||
clusterNames:
|
||||
- member
|
Loading…
Reference in New Issue