From b92792569f948576a18ceb824d776a03ee7a59da Mon Sep 17 00:00:00 2001 From: changzhen Date: Tue, 11 Jan 2022 20:52:54 +0800 Subject: [PATCH] complete missing step for working-with-anp Signed-off-by: changzhen --- docs/working-with-anp.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/working-with-anp.md b/docs/working-with-anp.md index 04f1208e916b..796425056e3e 100644 --- a/docs/working-with-anp.md +++ b/docs/working-with-anp.md @@ -292,4 +292,16 @@ Deploying the proxy-agent in the pull mode member cluster (in this example, clus kind load docker-image swr.ap-southeast-1.myhuaweicloud.com/karmada/proxy-agent:0.0.24 --name member3 kubectl --kubeconfig=/root/.kube/members.config --context=member3 apply -f proxy-agent.yaml ``` -**The ANP deployment is complete.** \ No newline at end of file +**The ANP deployment is complete.** + +### Step 6: Add command flags for karmada-agent deployment + +After deploying the ANP deployment, we need to add extra command flags `--cluster-api-endpoint` and `--proxy-server-address` for `karmada-agent` deployment in `member3` cluster. + +Where `--cluster-api-endpoint` is the APIEndpoint of the cluster. You can obtain it from the KubeConfig file of the `member3` cluster. + +Where `--proxy-server-address` is the address of the proxy server that is used to proxy the cluster. In current case, we can set `--proxy-server-address` to `http://:8088`. Get `karmada_controlplan_addr` value through the following command: +```shell +docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' karmada-host-control-plane +``` +Port `8088` is set by our code modification in ANP: https://github.com/mrlihanbo/apiserver-network-proxy/blob/v0.0.24/dev/cmd/server/app/server.go#L267. You can also modify it to a different value.