<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CLI Commands on Kyverno</title><link>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/</link><description>Recent content in CLI Commands on Kyverno</description><generator>Hugo</generator><language>en</language><atom:link href="https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/index.xml" rel="self" type="application/rss+xml"/><item><title>apply</title><link>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/apply/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/apply/</guid><description>&lt;p>The &lt;code>apply&lt;/code> command is used to perform a dry run on one or more policies with a given set of input resources. This can be useful to determine a policy&amp;rsquo;s effectiveness prior to committing to a cluster. In the case of mutate policies, the &lt;code>apply&lt;/code> command can show the mutated resource as an output. The input resources can either be resource manifests (one or multiple) or can be taken from a running Kubernetes cluster. The &lt;code>apply&lt;/code> command supports files from URLs both as policies and resources.&lt;/p></description></item><item><title>test</title><link>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/test/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/test/</guid><description>&lt;p>The &lt;code>test&lt;/code> command is used to test a given set of resources against one or more policies to check desired results, declared in advance in a separate test manifest file, against the actual results. &lt;code>test&lt;/code> is useful when you wish to declare what your expected results should be by defining the intent which then assists with locating discrepancies should those results change.&lt;/p>
&lt;p>&lt;code>test&lt;/code> works by scanning a given location, which can be either a Git repository or local folder, and executing the tests defined within. The rule types &lt;code>validate&lt;/code>, &lt;code>mutate&lt;/code>, and &lt;code>generate&lt;/code> are currently supported. The command recursively looks for YAML files with policy test declarations (described below) with a specified file name and then executes those tests. All files applicable to the same test must be co-located. Directory recursion is supported. &lt;code>test&lt;/code> supports the &lt;a href="https://release-1-16-0--kyverno.netlify.app/docs/policy-types/cluster-policy/autogen/">auto-gen feature&lt;/a> making it possible to test, for example, Deployment resources against a Pod policy.&lt;/p></description></item><item><title>jp</title><link>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/jp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://release-1-16-0--kyverno.netlify.app/docs/kyverno-cli/usage/jp/</guid><description>&lt;p>The Kyverno CLI has a &lt;code>jp&lt;/code> subcommand which makes it possible to test not only the custom filters endemic to Kyverno but also the full array of capabilities of JMESPath included in the &lt;code>jp&lt;/code> tool itself &lt;a href="https://github.com/jmespath/jp">here&lt;/a>. By passing in either through stdin or a file, both for input JSON or YAML documents and expressions, the &lt;code>jp&lt;/code> subcommand will evaluate any JMESPath expression and supply the output.&lt;/p>
&lt;p>Examples:&lt;/p>
&lt;p>List available Kyverno custom JMESPath filters. Please refer to the JMESPath documentation page &lt;a href="https://release-1-16-0--kyverno.netlify.app/docs/policy-types/cluster-policy/jmespath/">here&lt;/a> for extensive details on each custom filter. Note this does not show the built-in JMESPath filters available upstream, only the custom Kyverno filters.&lt;/p></description></item></channel></rss>