Search…
Using YAML
If you would rather use Kubernetes YAML to set up your cluster, you can do so in 3 steps.

Step 1/3: Generate Your YAML File

To generate the YAML file you'll need, use
1
zli generate kubeYaml {clusterName}
Copied!
where clusterName is the name of your cluster.
Rather than see the output directly in your terminal, you can add the argument
1
--outputFile {someFile}
Copied!
or -o at the end of the command above to pipe it to a file instead.
This will look like
1
zli generate kubeYaml {clusterName] --outputFile {someFile}
Copied!
where someFile will be the name of your YAML file.
This command will generate a Kubernetes YAML with a Service Account, RBAC permissions/bindings, secret, and deployment.
Note: This YAML will only be valid for 10 minutes after creation due to activation token expiration. If more than 10 minutes has passed, please generate the YAML file again.

Step 2/3: Apply Your YAML

Next, apply the newly created YAML using
1
kubectl apply -f {someFile}
Copied!
This will use your existing Kubernetes credentials to apply the YAML and create BastionZero's agent in the cluster.

Step 3/3: Ensure Agent Is Ready

Now you can check to see if your cluster has phoned home by running
1
zli list-targets -detail
Copied!
You should see a list of your targets along with the new Kubernetes cluster {clusterName} you created.
List of targets within a Kubernetes cluster that is secured by BastionZero
Follow the steps here to modify your policy.