You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`--cluster-name <NAME>`: Name of the `kind` cluster to be created Default: `knp-test-cluster`
28
+
-`--overwrite-cluster`: Overwrite existing `kind` cluster if necessary. Default: do not overwrite.
29
+
-`--server-image <IMAGE_NAME>[:<IMAGE_TAG>]`: Proxy server image to deploy. Default: `gcr.io/k8s-staging-kas-network-proxy/proxy-server:master`
30
+
-`--agent-image <IMAGE_NAME>[:<IMAGE_TAG>]`: Proxy server image to deploy. Default: `gcr.io/k8s-staging-kas-network-proxy/proxy-agent:master`
31
+
-`--num-kcp-nodes <NUM>`: Number of control plane nodes to spin up. Default: 2.
32
+
-`--num-worker-nodes <NUM>`: Number of worker nodes to spin up. Default: 1.
33
+
-`--sideload-images`: Use `kind load ...` to sideload custom proxy server and agent images with the names set by `--server-image` and `--agent-image` into the kind cluster. Default: do not sideload.
34
+
- Use this if you don't want to publish your custom KNP images to a public registry.
35
+
- NOTE: You MUST specify an image tag (i.e. `my-image-name:my-image-tag` and not just `my-image-name`) and the image tag MUST NOT be `:latest` for this to work! See [`kind` docs](https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster) for why this is necessary.
36
+
37
+
## Example usage to deploy custom local KNP images
38
+
In the repo root, build KNP and its docker images with the following:
39
+
```shell
40
+
make clean
41
+
make certs
42
+
make gen
43
+
make build
44
+
make docker-build
45
+
```
46
+
47
+
Verify that the new images are available in the local docker registry with `docker images`. Then, bring up the cluster:
48
+
49
+
```shell
50
+
cd examples/kind-multinode-kcp
51
+
52
+
# These are the default values of the registry, image name, and tag used by the Makefile.
Check that the `konnectivity` pods are up and running:
66
+
```shell
67
+
kubectl --namespace kube-system get pods | grep konnectivity
68
+
# Output:
69
+
# konnectivity-agent-4db5j 1/1 Running 0 34m
70
+
# konnectivity-agent-c7gj5 1/1 Running 0 34m
71
+
# konnectivity-agent-h86l9 1/1 Running 0 34m
72
+
# konnectivity-server-9bl45 1/1 Running 0 34m
73
+
# konnectivity-server-dcfz8 1/1 Running 0 34m
74
+
# konnectivity-server-klww5 1/1 Running 0 34m
75
+
# konnectivity-server-nrfz8 1/1 Running 0 34m
76
+
```
77
+
78
+
Then create a test pod on a worker node and verify you can get logs from it:
79
+
```shell
80
+
kubectl run test --image httpd:2
81
+
# Output:
82
+
# pod/test created
83
+
kubectl get pods
84
+
# Output:
85
+
# NAME READY STATUS RESTARTS AGE
86
+
# test 1/1 Running 0 34s
87
+
kubectl logs test
88
+
# Output:
89
+
# AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.244.5.3. Set the 'ServerName' directive globally to suppress this message
90
+
# AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.244.5.3. Set the 'ServerName' directive globally to suppress this message
91
+
# [Wed Jun 12 20:42:06.471169 2024] [mpm_event:notice] [pid 1:tid 139903660291968] AH00489: Apache/2.4.59 (Unix) configured -- resuming normal operations
# For escaping sed replacement strings. Taken from https://stackoverflow.com/questions/29613304/is-it-possible-to-escape-regex-metacharacters-reliably-with-sed.
0 commit comments