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
2 changes: 2 additions & 0 deletions src/pages/docs/kubernetes/targets/kubernetes-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Conceptually, a Kubernetes API target represent a permission boundary and an endpoint. Kubernetes [permissions](https://oc.to/KubernetesRBAC) and [quotas](https://oc.to/KubernetesQuotas) are defined against a namespace, and both the account and namespace are captured as a Kubernetes API target, along with the cluster endpoint URL. A namespace is required when registering the Kubernetes API target with Octopus Deploy. By default, the namespace used in the registration is used in health checks and deployments. The namespace can be overwritten in the deployment process.

:::div{.hint}
From **Octopus 2022.2**, AKS target discovery has been added to the

Check failure on line 16 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:16:68 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md009.md
Kubernetes Target Discovery Early Access Preview and is enabled via **Configuration ➜ Features**.

From **Octopus 2022.3** will include EKS cluster support.
Expand All @@ -21,7 +21,7 @@

## Discovering Kubernetes targets

Octopus can discover Kubernetes API targets in _Azure Kubernetes Service_ (AKS) or _Amazon Elastic Container Service for Kubernetes_ (EKS) as part of your deployment using tags on your AKS or EKS resource.

Check failure on line 24 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Emphasis style

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:24:132 MD049/emphasis-style Emphasis style [Expected: asterisk; Actual: underscore] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md049.md

Check failure on line 24 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Emphasis style

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:24:84 MD049/emphasis-style Emphasis style [Expected: asterisk; Actual: underscore] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md049.md

Check failure on line 24 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Emphasis style

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:24:73 MD049/emphasis-style Emphasis style [Expected: asterisk; Actual: underscore] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md049.md

Check failure on line 24 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Emphasis style

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:24:48 MD049/emphasis-style Emphasis style [Expected: asterisk; Actual: underscore] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md049.md

Check failure on line 24 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:24:206 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md009.md

:::div{.hint}
From **Octopus 2022.3**, you can configure the well-known variables used to discover Kubernetes targets when editing your deployment process in the Web Portal. See [cloud target discovery](/docs/infrastructure/deployment-targets/cloud-target-discovery) for more information.
Expand Down Expand Up @@ -87,7 +87,7 @@

The Azure Service Principal is only used with AKS clusters. To log into ACS or ACS-Engine clusters, standard Kubernetes credentials like certificates or service account tokens must be used.

:::div{.hint}

Check failure on line 90 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:90:20 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 6] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md009.md
From Kubernetes 1.26, [the default azure auth plugin has been removed from kubectl](https://github.com/kubernetes/kubernetes/blob/ad18954259eae3db51bac2274ed4ca7304b923c4/CHANGELOG/CHANGELOG-1.26.md#deprecation) so clusters targeting Kubernetes 1.26+ that have [Local Account Access disabled](https://oc.to/AKSDisableLocalAccount) in Azure, will require the worker or execution container to have access to the [kubelogin](https://oc.to/Kubelogin) CLI tool, as well as the Octopus Deployment Target setting **Login with administrator credentials** disabled. This requires **Octopus 2023.3*.

If Local Account access is enabled on the AKS cluster, the Octopus Deployment Target setting Login with administrator credentials will also need to be enabled so that the Local Accounts are used instead of the default auth plugin.
Expand All @@ -95,7 +95,7 @@

- **AWS Account**: When using an EKS cluster, [AWS accounts](/docs/infrastructure/accounts/aws) allow IAM accounts and roles to be used.

The interaction between AWS IAM and Kubernetes Role Based Access Control (RBAC) can be tricky. We highly recommend reading the [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html).

Check failure on line 98 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:98:223 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md009.md

:::div{.hint}
**Common issues:**
Expand Down Expand Up @@ -134,8 +134,8 @@
-out certificate_and_key.pfx `
-in certificate.crt `
-inkey private.key
```

Check failure on line 137 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Fenced code blocks should be surrounded by blank lines

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:137 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md031.md
```bash

Check failure on line 138 in src/pages/docs/kubernetes/targets/kubernetes-api/index.md

View workflow job for this annotation

GitHub Actions / lint

Fenced code blocks should be surrounded by blank lines

src/pages/docs/kubernetes/targets/kubernetes-api/index.md:138 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md031.md
#!/bin/bash
echo $1 | base64 --decode > certificate.crt
echo $2 | base64 --decode > private.key
Expand Down Expand Up @@ -313,6 +313,8 @@

Setting the Octopus variable `Octopus.Action.Kubernetes.OutputKubeConfig` to `True` for any deployment or runbook using a Kubernetes target will cause the generated kube config file to be printed into the logs (with passwords masked). This can be used to verify the configuration file used to connect to the Kubernetes cluster.

Setting the Octopus variable `Octopus.Action.Kubernetes.VerboseOutput` to `True` will cause successful output from Kubernetes CLI tools (`kubectl`, `helm`, `aws`, `az`, `gcloud`, etc.) to be logged at the Info level instead of Verbose. This is useful when debugging deployments to see the full output of these tools without needing to enable verbose logging for the entire deployment.

If Kubernetes targets fail their health checks, the best way to diagnose the issue to to run a `Run a kubectl CLI Script` step with a script that can inspect the various settings that must be in place for a Kubernetes target to function correctly. Octopus deployments will run against unhealthy targets by default, so the fact that the target failed its health check does not prevent these kinds of debugging steps from running.

An example script for debugging a Kubernetes target is shown below:
Expand Down
8 changes: 8 additions & 0 deletions src/pages/docs/projects/variables/system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,14 @@ Octopus will run one task at a time for a given concurrency tag. Set the variabl

Example: #{Octopus.Deployment.Tenant.Id}/#{Octopus.Project.Id}/#{Octopus.Environment.Id}

### Kubernetes

`Octopus.Action.Kubernetes.VerboseOutput`

Set to `True` to log successful output from Kubernetes CLI tools (`kubectl`, `helm`, `aws`, `az`, `gcloud`, etc.) at the Info level instead of Verbose. This is useful when debugging deployments to see the full output of these tools without needing to enable verbose logging for the entire deployment.

Example: True

## Older versions {#older-versions}
* `Octopus.Release.Git.BranchName`, `Octopus.Release.Git.CommitHash` and `Octopus.Release.Git.Ref` is available from Octopus Deploy **2021.3** onwards.
* `Octopus.Web.ServerUri` is available from Octopus Deploy **2019.4.0** onwards.
Expand Down