Skip to content

Commit

Permalink
feat: Better setup descriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Klingenberg <fredrkl@gmail.com>
  • Loading branch information
fredrkl committed Mar 25, 2023
1 parent c581d92 commit 5f2037d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"ghcr.io/mpriscella/features/kind:1": {
"version": "latest"
}
},
"ghcr.io/devcontainers-contrib/features/kubectl-asdf:2": {}
},
"postCreateCommand": "bash -i ./.devcontainer/setup.sh",
"customizations": {
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ complete -F __start_kubectl k
export PATH=~/.kubectx:$PATH
alias kx=kubectx
alias kns=kubens
EOF
EOF

mkdir ~/.kube
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
# Kyverno Demo

## Setting up the demo with the devcontainer
## Setup

### devcontainer
This demo shows how to use Kyverno to enforce policies on Kubernetes resources. You can use the devcontainer following this repo. The devcontainer has all the tools installed to run the demo.

## Setting up the demo without the devcontainer
### Setting up the demo without the devcontainer
First, you will need to have _kind_ installed. You can find instructions on how to install _kind_ [here](https://kind.sigs.k8s.io/docs/user/quick-start/).

## Running the demo

### Create a cluster
To create a cluster, run the following command:

```bash
kind create cluster --name kyverno-demo
```

### Get the kubeconfig

```bash
kind get kubeconfig --name kyverno-demo > ~/.kube/config
```

### Install Kyverno
To install Kyverno, run the following command:

```bash
kubectl apply -f https://raw.githubusercontent.com/kyverno/kyverno/main/definitions/release/install.yaml
```

0 comments on commit 5f2037d

Please sign in to comment.