Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions _docs/deployments/kubernetes/custom-kubectl-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@ In the current Codefresh implementation, this expands to `/codefresh/volume/sens

When you use custom `kubectl` commands, it is your responsibility to template your manifests using any of the available options. To employ Codefresh for templating, it is better to use the dedicated [cf-deploy-kubernetes step]({{site.baseurl}}/docs/ci-cd-guides/kubernetes-templating/), which provides simple templating capabilities.

## Using the Codefresh kubectl image

Codefresh already offers a public Docker image with `kubectl` at [https://hub.docker.com/r/codefresh/kubectl/tags](https://hub.docker.com/r/codefresh/kubectl/tags){:target="\_blank"}. You can choose a specific version of `kubectl` with the appropriate tag or just select `latest` for the most up-to-date version.

`YAML`
{% highlight yaml %}
{% raw %}
version: '1.0'
steps:
MyCustomKubectlCommands:
title: Running Kubectl
image: codefresh/kubectl:1.13.3
commands:
- echo $CF_KUBECONFIG_PATH
- kubectl help
{% endraw %}
{% endhighlight %}

If you run the pipeline, you can see the help options for `kubectl`.

## Getting a config context

The important thing to know when running custom `kubectl` commands is that Codefresh automatically sets up
Expand Down Expand Up @@ -183,4 +163,4 @@ In the example above, we select one of the clusters in each deployment step, and





2 changes: 2 additions & 0 deletions _docs/pipelines/what-is-the-codefresh-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ steps:
Notice that Codefresh also provides the following variables that allow you change your script/applications according to the retry attempts:

* `CF_CURRENT_ATTEMPT` contains the number of current retry attempt.
> **Note:** This variable is always contextual to the exact step and does not reflect the parent state

* `CF_MAX_ATTEMPTS` contains all the number of total attempts defined.

The retry mechanism is available for all kinds of [steps]({{site.baseurl}}/docs/pipelines/steps/).
Expand Down