Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
luckymrwang committed Feb 28, 2021
1 parent 774f46d commit fbc2eb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ admissionregistration.k8s.io/v1beta1
4. Deploy resources:

```
# kubectl create -f deployment/nginxconfigmap.yaml
# kubectl create -f deployment/configmap.yaml
# kubectl create -f deployment/deployment.yaml
# kubectl create -f deployment/service.yaml
Expand Down Expand Up @@ -107,13 +106,19 @@ kube-system Active 26m
sidecar-injector Active 17m
```

3. Deploy an app in Kubernetes cluster, take `alpine` app as an example
3. Deploy an configmap in Kubernetes cluster

```
# kubectl apply -f ./deployment/nginxconfigmap.yaml -n injection
```

4. Deploy an app in Kubernetes cluster, take `alpine` app as an example

```
# kubectl run alpine --image=alpine --restart=Never -n injection --overrides='{"apiVersion":"v1","metadata":{"annotations":{"sidecar-injector-webhook.morven.me/inject":"yes"}}}' --command -- sleep infinity
```

4. Verify sidecar container is injected:
5. Verify sidecar container is injected:

```
# kubectl get pod -n injection
Expand Down
1 change: 0 additions & 1 deletion deployment/nginxconfigmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configmap
namespace: sidecar-injector
data:
nginx.conf: |
worker_processes 1;
Expand Down

0 comments on commit fbc2eb2

Please sign in to comment.