> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TransIP API Credentials

> Store the login and the private key of a TransIP API key pair in Ankra to create, import and operate TransIP Kubernetes clusters - what the key pair reaches, the IP whitelist, and the connection test.

A TransIP credential holds the login you sign in to the TransIP control panel with and the private key of an API key pair made there. Ankra uses it to create, import and operate [TransIP Kubernetes](https://docs.ankra.ai/guides/transip-clusters.md) clusters. The credential is checked when you save it: Ankra signs in to TransIP with the key pair and calls TransIP's API test, so a wrong login, a key that does not parse or an address TransIP refuses is caught before anything is stored.

> [!WARNING]
>
> **Closed beta.** TransIP credentials are part of the TransIP provider, which is in closed beta and enabled per organisation on request. Until it is, TransIP does not appear among the credential providers and its endpoints and commands answer not found. [Contact support](https://docs.ankra.ai/platform/support.md) to have it turned on for your organisation.

## What the key pair reaches

> [!WARNING]
>
> TransIP cannot limit a key pair to Kubernetes, to one cluster or to reading. Whoever holds the private key can order and cancel everything in the TransIP account, domains and invoices included. Make the key pair in a TransIP account that holds only what Ankra should manage.

Ankra keeps the private key in its vault and never shows it again: no list, read or log carries it. With it, Ankra signs in for access tokens that last an hour. TransIP lists each token in the control panel under its label, which starts with `ankra-`.

Ankra uses the key pair for these calls only:

| TransIP API | Operations | Why it's used |
| - | - | - |
| `/auth` | create | Access tokens, signed with the private key |
| `/api-test` | read | The connection test |
| `/availability-zones` | read | The zones in the create form |
| `/kubernetes/products`, `/kubernetes/releases` | read | Node sizes and Kubernetes versions |
| `/kubernetes/clusters` | create, read, update, delete | Ordering, discovering, upgrading and cancelling clusters |
| `/kubernetes/clusters/{clusterName}/node-pools` | create, read, update, delete | Node pools, their autoscaling, labels and taints |
| `/kubernetes/clusters/{clusterName}/kube-config` | read | Connect the Ankra agent |
| `/kubernetes/clusters/{clusterName}/releases` | read | The releases a cluster can be upgraded to |

The account's request limit counts every call above, along with your own tooling's. See [what to know about TransIP](https://docs.ankra.ai/guides/transip-clusters.md#what-to-know-about-transip-first).

## Creating a TransIP credential

**1. Switch the API on and make a key pair at TransIP**

1. Sign in to the [TransIP control panel](https://www.transip.eu/cp/). Open your profile at the top right, then My account, then API.
2. Set the API's status to on, if it is not already.
3. Add a key pair. Decide first whether it should accept only whitelisted IP addresses - see [the IP whitelist](#the-ip-whitelist).
4. Copy the private key. TransIP shows it once, when the key pair is made. Keep it in a secret manager, and never put it in Git, a ticket or a command line.

TransIP's own guide is [Using the TransIP REST API](https://www.transip.eu/knowledgebase/77-using-the-transip-rest-api).

**2. Add it to Ankra**

> [tab] Portal
>
> Go to **Integrations & alerts → Credentials**, click **Add credential**, and under **Cloud providers** choose **TransIP**. Before the TransIP fields, the form warns **This key pair can change your whole TransIP account**. Enter:
>
> * **Name**: 3 to 100 lowercase letters, digits and single hyphens (for example `transip-prod`). It cannot change later.
> * **Login**: the login you sign in to the TransIP control panel with.
> * **Private key**: paste the whole key, including its BEGIN and END lines, or click **Read it from a file**. The control panel hands out a PKCS #8 key (`-----BEGIN PRIVATE KEY-----`); a PKCS #1 RSA key (`-----BEGIN RSA PRIVATE KEY-----`) works too. A key protected with a passphrase does not.
>
> Click **Test the connection**. You see **The connection works**. Then click **Add credential**; the credential's page opens.

> [tab] CLI
>
> The command reads the private key from a file or from stdin, never from a flag value, so it stays out of your shell history. It never prints the key:
>
> ```bash theme={null}
> ankra credentials transip create --name transip-prod \
>   --login <control-panel-login> \
>   --private-key-file <path-to-private-key>
> ```
>
> Use `--private-key-stdin` instead of `--private-key-file` to pipe the key in. Before it sends anything, the command prints two notes: that the key pair reaches the whole TransIP account, and what the IP whitelist needs.

You need a role with `credentials.write` to add the credential or replace its key (the built-in `owner` and `admin` roles have it). See [Credentials](https://docs.ankra.ai/platform/credentials.md#before-you-start).

## The IP whitelist

When you add a key pair, TransIP offers to accept requests from whitelisted IP addresses only. The option is on unless you untick it, and one whitelist serves every key pair of the account that uses it. With it on, TransIP refuses Ankra until the address Ankra calls from is on the whitelist. Ankra calls TransIP over IPv4 only, so that address is an IPv4 address.

> [!NOTE]
>
> Ankra does not publish a fixed list of the addresses it calls TransIP from yet.

You have two choices:

* **Keep the whitelist and add Ankra's address.** Test the connection. When TransIP refuses the address and reports the one it saw, the result names it: "TransIP refused the request: this key pair only accepts whitelisted IP addresses, and Ankra called from \<address>. Add \<address> to the IP whitelist of the account's API settings in the TransIP control panel." Add it and test again. When TransIP does not report it, the result says "TransIP did not say which address it saw", and the way on is a key pair without the whitelist. The jobs that create, scale and delete clusters may call from another address; a refusal there names that address the same way when TransIP reports it. If Ankra's address changes later, TransIP refuses Ankra until the new one is added.
* **Use a key pair without the whitelist.** Untick the option when you add the key pair. It keeps working if Ankra's address changes. The whole-account reach above then matters even more, so keep the key in a secret manager.

## Connection test results

**Test the connection** in the form, and **Check now** on the credential's page, mostly give one of these answers. The last three, and a TransIP Ankra cannot reach, leave the key pair unchecked, and the form says **The connection could not be checked** for them.

| What you see | What to do |
| - | - |
| "The provider accepted these values." in the form, "The provider accepted this credential just now." from **Check now** | Nothing: the credential works |
| "The private key is not a usable RSA private key in PEM format." | Paste the whole key, including its BEGIN and END lines. TransIP shows a private key once, so create a new key pair if it was lost |
| "TransIP refused the login or the key pair." | Check that the login is the one you sign in to the TransIP control panel with. The key pair may have been removed in the control panel: create a new one and use its private key |
| "TransIP refused the request: this key pair only accepts whitelisted IP addresses, ..." | Add the address it names, or use a key pair without the whitelist - see [the IP whitelist](#the-ip-whitelist). When it ends "TransIP did not say which address it saw", there is no address to add: use a key pair without the whitelist |
| "The TransIP API is not enabled for this account." | Switch the API on in the TransIP control panel, under the account's API settings, then test again |
| "The request limit of this TransIP account is used up, so the key pair could not be checked." | Test again in a few minutes. The limit is shared by everything that calls TransIP for the account |
| "TransIP did not answer in time, so the key pair could not be checked." | TransIP may be slow or down. Test again in a few minutes |
| "TransIP issued an access token and then rejected it." | Test again. If it keeps happening, the key pair was removed while it was being checked |

## Replacing the private key

Under **Settings & access → Replace the secret**, enter the **Private key** of a new key pair in the same TransIP account and click **Check and replace**. The login stays as it is: a key pair of another account needs a credential of its own. Ankra checks the new key with TransIP, and against each cluster that uses the credential, before it stores it. See [Replace the secret](https://docs.ankra.ai/platform/credentials.md#replace-the-secret).

**Stored values** shows the login, and names the private key as never shown.

## Listing TransIP credentials

```bash theme={null}
ankra credentials transip list
```

A credential that a cluster uses cannot be deleted: **Credential is in use by a cluster and cannot be deleted**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.