cd docker
docker build . -t localserver
- Cut and Paste the root CA from the docker build output
Step 12/13 : RUN cat rootCA.crt | base64 | tr -d '\n'
and replace the value currently in https://github.com/purn1mak/K8S-sidecar/blob/master/k8s/hook.yaml#L14 docker login
use your credentials. Create a repository sidecardocker tag localserver:latest purnimak/private-sidecar:localserver
docker push purnimak/private-sidecar:localserver
Use your repo namecd ../k8s
Use the same image name in https://github.com/purn1mak/K8S-sidecar/blob/master/k8s/deployment.yaml#L18kubectl create -f deployment.yaml
kubectl describe deployments webhook-server
kubectl get pods
kubectl describe pods webhook-server-58d7fdf878-sgjnr
kubectl get pods
kubectl create -f service.yaml
kubectl create -f hook.yaml
kubectl get mutatingwebhookconfiguration
kubectl create -f test.yaml
Describe pod test and see note that it now also includes a new label for foo bar.
purn1mak / k8s-sidecar Goto Github PK
View Code? Open in Web Editor NEWK8S-sidecar