Manually Installing Sidecar
Use this option if you need to add some very special configuration or if you run into problems.
Manual sidecar injection is not the preferred deployment method. Please deploy using the Operator if possible.

Pre-Requisite: secrets

The sidecar containers need additional secrets to be downloaded. Add the secrets to your namespace with:
1
$ speedctl deploy creds | kubectl -n <NS> apply -f -
2
3
secret/gcrcred created
4
secret/awscreds created
5
secret/ss-certs created
Copied!

Install Sidecar

To install a sidecar you need two pieces of information * The application namespace: * The service deployment name:
Insert these values into the following statement:
1
$ kubectl -n <NS> get deployment <DEP> -o yaml | speedctl inject -f - | kubectl apply -f -
2
3
deployment/<DEP> configured
Copied!
Verify that the sidecar was properly injected by checking the pod status. Because there is now a sidecar running alongside your application container, you will see the pod container count increase by one. For example:
1
$ kubectl -n <NS> get pods
2
3
NAME READY STATUS RESTARTS AGE
4
front-end-xxxxxxxxxx-xxxxx 2/2 Running 0 2m11s
Copied!
Note that you may see a "young" age because the pod was restarted, and you should see 2/2 indicating that both the application container and the sidecar container have been started.

Uninstall Sidecar

To install a sidecar you can use the uninject command. It is configured the same way as inject. Here is an example:
1
$ kubectl -n <NS> get deployment <DEP> -o yaml | speedctl uninject -f - | kubectl apply -f -
2
3
deployment/<DEP> configured
Copied!
Just like before you can verify that the uninject worked by running get pods and looking at the output. However this time you would expect to see 1/1 because the sidecar has been removed.
1
$ kubectl -n <NS> get pods
2
3
NAME READY STATUS RESTARTS AGE
4
front-end-xxxxxxxxxx-xxxxx 1/1 Running 0 2m48s
Copied!
Last modified 11d ago