From 0363ae1e4ebf865946238f0ecc7f3b056c0ca989 Mon Sep 17 00:00:00 2001 From: Claudio Canales Date: Wed, 29 Sep 2021 16:16:45 -0300 Subject: [PATCH] Removing $ from bash commands Using the copy button is bringing the commands with a $, which is giving the error `-bash: $: command not found` after pasting them to the console. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ca2e7d3..3a4f8fc 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ If 1Password Connect is already running, you can skip this step. This guide will Encode the 1password-credentials.json file you generated in the prerequisite steps and save it to a file named op-session: ```bash -$ cat 1password-credentials.json | base64 | \ +cat 1password-credentials.json | base64 | \ tr '/+' '_-' | tr -d '=' | tr -d '\n' > op-session ``` Create a Kubernetes secret from the op-session file: ```bash -$ kubectl create secret generic op-credentials --from-file=1password-credentials.json +kubectl create secret generic op-credentials --from-file=1password-credentials.json ``` Add the following environment variable to the onepassword-connect-operator container in `deploy/operator.yaml`: @@ -53,12 +53,12 @@ Adding this environment variable will have the operator automatically deploy a d "Create a Connect token for the operator and save it as a Kubernetes Secret: ```bash -$ kubectl create secret generic onepassword-token --from-literal=token=" +kubectl create secret generic onepassword-token --from-literal=token=" ``` If you do not have a token for the operator, you can generate a token and save it to kubernetes with the following command: ```bash -$ kubectl create secret generic onepassword-token --from-literal=token=$(op create connect token op-k8s-operator --vault ) +kubectl create secret generic onepassword-token --from-literal=token=$(op create connect token op-k8s-operator --vault ) ``` [More information on generating a token can be found here](https://support.1password.com/secrets-automation/#appendix-issue-additional-access-tokens) @@ -68,13 +68,13 @@ $ kubectl create secret generic onepassword-token --from-literal=token=$(op crea We must create a service account, role, and role binding and Kubernetes. Examples can be found in the `/deploy` folder. ```bash -$ kubectl apply -f deploy/permissions.yaml +kubectl apply -f deploy/permissions.yaml ``` **Create Custom One Password Secret Resource** ```bash -$ kubectl apply -f deploy/crds/onepassword.com_onepassworditems_crd.yaml +kubectl apply -f deploy/crds/onepassword.com_onepassworditems_crd.yaml ``` **Deploying the Operator** @@ -112,13 +112,13 @@ spec: Deploy the OnePasswordItem to Kubernetes: ```bash -$ kubectl apply -f .yaml +kubectl apply -f .yaml ``` To test that the Kubernetes Secret check that the following command returns a secret: ```bash -$ kubectl get secret +kubectl get secret ``` Note: Deleting the `OnePasswordItem` that you've created will automatically delete the created Kubernetes Secret.