Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 06f53b4

Browse files
committed
Add unix:// prefix for socket addresses used by CRI remote client.
Signed-off-by: Lantao Liu <[email protected]>
1 parent 59d7112 commit 06f53b4

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sudo containerd
121121
```
122122
2. From the Kubernetes project directory startup a local cluster using `containerd`:
123123
```bash
124-
CONTAINER_RUNTIME=remote CONTAINER_RUNTIME_ENDPOINT='/run/containerd/containerd.sock' ./hack/local-up-cluster.sh
124+
CONTAINER_RUNTIME=remote CONTAINER_RUNTIME_ENDPOINT='unix:///run/containerd/containerd.sock' ./hack/local-up-cluster.sh
125125
```
126126
### Test
127127
See [here](./docs/testing.md) for information about test.

cluster/gce/env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111
export KUBE_MASTER_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/master.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,containerd-env=${version_file}"
1212
export KUBE_NODE_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/node.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,containerd-env=${version_file}"
1313
export KUBE_CONTAINER_RUNTIME="remote"
14-
export KUBE_CONTAINER_RUNTIME_ENDPOINT="/run/containerd/containerd.sock"
14+
export KUBE_CONTAINER_RUNTIME_ENDPOINT="unix:///run/containerd/containerd.sock"
1515
export KUBE_CONTAINER_RUNTIME_NAME=containerd
1616
export KUBE_LOAD_IMAGE_COMMAND="/home/containerd/usr/local/bin/ctr cri load"
1717
export NETWORK_PROVIDER=""

contrib/ansible/cri-containerd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- name: "Add runtime args in kubelet conf"
4747
lineinfile:
4848
dest: "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf"
49-
line: "Environment=\"KUBELET_EXTRA_ARGS= --runtime-cgroups=/system.slice/containerd.service --container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=/run/containerd/containerd.sock\""
49+
line: "Environment=\"KUBELET_EXTRA_ARGS= --runtime-cgroups=/system.slice/containerd.service --container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=unix:///run/containerd/containerd.sock\""
5050
insertafter: '\[Service\]'
5151
when: check_args.stdout == ""
5252

@@ -57,5 +57,5 @@
5757
- name: "Pre-pull pause container image"
5858
shell: |
5959
/usr/local/bin/ctr pull k8s.gcr.io/pause:3.1
60-
/usr/local/bin/crictl --runtime-endpoint /run/containerd/containerd.sock \
60+
/usr/local/bin/crictl --runtime-endpoint unix:///run/containerd/containerd.sock \
6161
pull k8s.gcr.io/pause:3.1

docs/crictl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ so you don't have to repeatedly specify the runtime sock used to connect crictl
2222
to the container runtime:
2323
```console
2424
$ cat /etc/crictl.yaml
25-
runtime-endpoint: /run/containerd/containerd.sock
26-
image-endpoint: /run/containerd/containerd.sock
25+
runtime-endpoint: unix:///run/containerd/containerd.sock
26+
image-endpoint: unix:///run/containerd/containerd.sock
2727
timeout: 10
2828
debug: true
2929
```
@@ -188,7 +188,7 @@ $ crictl info
188188
"sandboxImage": "k8s.gcr.io/pause:3.1",
189189
"statsCollectPeriod": 10,
190190
"containerdRootDir": "/var/lib/containerd",
191-
"containerdEndpoint": "/run/containerd/containerd.sock",
191+
"containerdEndpoint": "unix:///run/containerd/containerd.sock",
192192
"rootDir": "/var/lib/containerd/io.containerd.grpc.v1.cri",
193193
"stateDir": "/run/containerd/io.containerd.grpc.v1.cri",
194194
},

hack/install/install-critools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ make
3333
${SUDO} make install -e BINDIR=${CRITOOL_DIR} GOPATH=${GOPATH}
3434
${SUDO} mkdir -p ${CRICTL_CONFIG_DIR}
3535
${SUDO} bash -c 'cat >'${CRICTL_CONFIG_DIR}'/crictl.yaml <<EOF
36-
runtime-endpoint: /run/containerd/containerd.sock
36+
runtime-endpoint: unix:///run/containerd/containerd.sock
3737
EOF'
3838

3939
# Clean the tmp GOPATH dir.

hack/test-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ -f "${CONTAINERD_CONFIG_FILE}" ]; then
2727
CONTAINERD_FLAGS+="--config ${CONTAINERD_CONFIG_FILE} "
2828
fi
2929

30-
CONTAINERD_SOCK=/run/containerd/containerd.sock
30+
CONTAINERD_SOCK=unix:///run/containerd/containerd.sock
3131

3232
containerd_pid=
3333

hack/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
1818

1919
# Not from vendor.conf.
20-
CRITOOL_VERSION=db53d78569a8116fff1f60366a8de3130e767eeb
20+
CRITOOL_VERSION=f37a5a1edb69ee742c6e42c57413fe6b63788085
2121
CRITOOL_PKG=github.com/kubernetes-incubator/cri-tools
2222
CRITOOL_REPO=github.com/kubernetes-incubator/cri-tools
2323

integration/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var (
5151
criPluginClient api.CRIPluginServiceClient
5252
)
5353

54-
var criEndpoint = flag.String("cri-endpoint", "/run/containerd/containerd.sock", "The endpoint of cri plugin.")
54+
var criEndpoint = flag.String("cri-endpoint", "unix:///run/containerd/containerd.sock", "The endpoint of cri plugin.")
5555
var criRoot = flag.String("cri-root", "/var/lib/containerd/io.containerd.grpc.v1.cri", "The root directory of cri plugin.")
5656

5757
func init() {

0 commit comments

Comments
 (0)