diff --git a/containers/kubernetes/how-to/enable-easy-deploy.mdx b/containers/kubernetes/how-to/enable-easy-deploy.mdx index 2d29301779..21dc4f9053 100644 --- a/containers/kubernetes/how-to/enable-easy-deploy.mdx +++ b/containers/kubernetes/how-to/enable-easy-deploy.mdx @@ -104,6 +104,15 @@ You can also deploy off-the-shelf applications pre-configured for Scaleway produ * Get the Load Balancer's external IP and use it in your web browser to access your application (WordPress in this case) + + We provide dedicated tutorials for deployment of the most popular applications using Easy Deploy: + * [Deploy Argo CD on Scaleway Kubernetes clusters using Easy Deploy](/tutorials/easydeploy-argocd/) + * [Deploy Vault on Scaleway Kubernetes clusters using Easy Deploy](/tutorials/easydeploy-vault/) + * [Deploy Grafana on Scaleway Kubernetes clusters using Easy Deploy](/tutorials/easydeploy-grafana/) + * [Deploy GitLab Server on Scaleway Kubernetes clusters using Easy Deploy](/tutorials/easydeploy-gitlab-server/) + * [Deploy GitLab Runner on Scaleway Kubernetes clusters using Easy Deploy](/tutorials/easydeploy-gitlab-runner/) + + ## How to edit an application 1. Click **Kubernetes** in the **Containers** section of the [Scaleway console](https://console.scaleway.com) side menu. The Kubernetes Kapsule overview displays. diff --git a/tutorials/easydeploy-argocd/index.mdx b/tutorials/easydeploy-argocd/index.mdx new file mode 100644 index 0000000000..af498ab7b9 --- /dev/null +++ b/tutorials/easydeploy-argocd/index.mdx @@ -0,0 +1,79 @@ +--- +meta: + title: Deploy Argo CD on Scaleway Kubernetes clusters using Easy Deploy + description: Deploy Argo CD on Scaleway Kubernetes clusters using Easy Deploy. This guide provides steps for Argo CD to pull application definitions from a Git repository. +content: + h1: Deploy Argo CD on Scaleway Kubernetes clusters using Easy Deploy + paragraph: Deploy Argo CD on Scaleway Kubernetes clusters using Easy Deploy. This guide provides steps for Argo CD to pull application definitions from a Git repository. +tags: Argo CD kubernetes easy deploy +categories: + - containers +dates: + validation: 2024-06-13 + posted: 2024-06-13 +--- + +Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. +It synchronizes application definitions from a Git repository, ensuring that the desired state of applications is maintained across clusters. +Designed for high scalability and automation, Argo CD supports multi-cluster deployments, automated rollbacks, and advanced RBAC policies. +This makes it ideal for managing complex Kubernetes environments with precision and reliability. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a Scaleway Kubernetes [Kapsule](/containers/kubernetes/how-to/create-cluster/) or [Kosmos](/containers/kubernetes/how-to/create-kosmos-cluster/) cluster + +## Deploying the Argo CD application using Easy Deploy + + +When configuring your Kubernetes cluster, note that certain applications and services, such as Argo CD, may result in additional resources being provisioned. +For example, your YAML configuration might create Block Storage volumes or Load Balancers, which could incur extra costs. + + + +1. In the [Scaleway console](https://console.scaleway.com/), navigate to the **Kubernetes** section under **Containers**. +2. Click the name of the cluster where you wish to deploy Argo CD. The **Cluster Information** tab will display. +3. Click the **Easy Deploy** tab. The application dashboard displays. +4. Click **Deploy Application**. The application deployment wizard displays. +5. Choose **Application Library** to see the list of available applications. +6. Select the **Argo CD** application. + + If you cannot find Argo CD on the first page, use the search bar or navigate through the library. + +7. Optionally, customize the default configuration for Argo CD using [Helm Charts](/tutorials/kubernetes-package-management-helm/). If you do not need any customized configuration you can skip this step. +8. Enter a name (e.g. `argocd`) and a Kubernetes namespace for your application. If no name is entered, Argo CD will be installed in the default namespace of the cluster. +9. Click **Deploy Application** to deploy Argo CD on your Kubernetes cluster. + +## Retrieving the Argo CD admin password + +1. Access the [Kubernetes Dashboard](/containers/kubernetes/how-to/access-kubernetes-dashboard/) of your cluster and navigate to **Secrets** under the **Config and Storage** section. +2. Click `argocd-initial-admin-secret` to display the application metadata information. +3. Click the "eye" icon next to `password` to reveal the Argo CD admin password. Copy the password. + +## Connecting to Argo CD + +Argo CD uses a LoadBalancer to manage traffic. To check the deployment status, run: + +``` +$ kubectl get svc +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +argocd-applicationset-controller ClusterIP 10.39.101.19 7000/TCP 5m40s +argocd-dex-server ClusterIP 10.36.208.223 5556/TCP,5557/TCP 5m40s +argocd-redis ClusterIP 10.34.58.107 6379/TCP 5m40s +argocd-repo-server ClusterIP 10.35.236.175 8081/TCP 5m40s +argocd-server LoadBalancer 10.39.250.191 195.154.xx.yyy 80:30372/TCP,443:32468/TCP 5m40s +kubernetes ClusterIP 10.32.0.1 443/TCP 55m +``` + +Once the external IP status changes from `` to the assigned external IP, your Argo CD application is up. Copy the IP address and paste it into a web browser. The Argo CD login screen will appear. + +## Logging into Argo CD + +1. Paste the external IP address of the LoadBalancer service into your web browser to open the Argo CD login screen. +2. Enter **admin** as the username and the password retrieved in the previous step to log in. + +### Going further + +For more information about Argo CD and setting up your metrics, refer to the [official Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/) \ No newline at end of file diff --git a/tutorials/easydeploy-gitlab-runner/index.mdx b/tutorials/easydeploy-gitlab-runner/index.mdx new file mode 100644 index 0000000000..190c55c281 --- /dev/null +++ b/tutorials/easydeploy-gitlab-runner/index.mdx @@ -0,0 +1,131 @@ +--- +meta: + title: Deploy GitLab Runner on Scaleway Kubernetes clusters using Easy Deploy + description: Learn how to deploy GitLab Runner on Scaleway Kubernetes clusters using the Easy Deploy feature. +content: + h1: Deploy GitLab Runner on Scaleway Kubernetes clusters using Easy Deploy + paragraph: Learn how to deploy GitLab Runner on Scaleway Kubernetes clusters using the Easy Deploy feature. +categories: + - containers +dates: + validation: 2024-06-20 + posted: 2024-06-20 +--- + +GitLab Runner is a powerful tool that executes CI/CD jobs in GitLab. +When hosted on Kubernetes, it leverages the scalability and resilience of container orchestration to efficiently manage and run your pipelines. +By deploying GitLab Runner on a Kubernetes cluster, you can dynamically scale the number of runners based on demand, ensure high availability, and seamlessly integrate with your existing Kubernetes infrastructure. +This setup enables you to optimize resource utilization, reduce overhead, and enhance the performance of your continuous integration and deployment processes. + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a Scaleway Kubernetes [Kapsule](/containers/kubernetes/how-to/create-cluster/) or [Kosmos](/containers/kubernetes/how-to/create-kosmos-cluster/) cluster +- A GitLab repository + +## Deploying the GitLab Runner application using Easy Deploy + +1. In the [Scaleway console](https://console.scaleway.com/), navigate to the **Kubernetes** section under **Containers**. +2. Click the name of the cluster where you wish to deploy GitLab Runner. The **Cluster Information** tab will display. +3. Click the **Easy Deploy** tab. The application dashboard displays. +4. Click **Deploy Application**. The application deployment wizard displays. +5. Choose **Application Library** to see the list of available applications. +6. Select the **GitLab Runner** application. + + If you cannot find GitLab Runner on the first page, use the search bar or navigate through the library using the arrow buttons. + +7. Optionally, customize the default configuration for GitLab Runner using [Helm Charts](/tutorials/kubernetes-package-management-helm/). If you do not need any customized configuration you can skip this step. +8. Enter a name (e.g. `gitlab-runner`) and a Kubernetes namespace for your application. If no name is entered, GitLab Runner will be installed in the default namespace of the cluster. +9. Click **Deploy Application** to deploy GitLab Runner on your Kubernetes cluster. +10. Verify that the GitLab Runner is successfully installed and running: + ```bash + kubectl get pods -n default # replace "default" with the name of the Kubernetes namespace in which you have installed your GitLab Runner. + ``` + You should see a pod with a name similar to `gitlab-runner-xxxxxx-xxxxx` in the `Running` state. + +## Configuring a GitLab CI/CD pipeline to use your Kubernetes Runner + + + If you do not have a GitLab repository yet, you can deploy a [GitLab server using Easy Deploy](/tutorials/gitlab-server/) on your Kubernetes cluster. + + +### Register the GitLab Runner with GitLab + +Before your GitLab Runner can start executing jobs from your GitLab repository, it needs to be registered with your GitLab server, as shown below: + +1. Obtain the GitLab Runner Registration Token: + - Go to your GitLab project. + - Navigate to **Settings** > **CI/CD** > **Runners**. + - Under the **Specific Runners** section, you will see the registration token. + +2. Register the GitLab Runner: + - Connect to your Kubernetes cluster where the GitLab Runner is deployed. + - Use the following command to start the registration process: + ```bash + kubectl exec -it -- gitlab-runner register + ``` + - When prompted, enter the following details: + - **GitLab instance URL:** The URL of your GitLab server (e.g., `https://gitlab.com` or your self-hosted GitLab URL). + - **Registration Token:** The token you obtained in the previous step. + - **Description:** A description for this runner (e.g., `k8s-runner`). + - **Tags:** Tags for the runner (e.g., `k8s-runner`). These tags should match the tags specified in your `.gitlab-ci.yml` file. + - **Executor:** Select `kubernetes` as the executor. + +### Verify Runner registration + +After registering the runner, verify that it is correctly registered and active: + +1. In your GitLab project, navigate to **Settings** > **CI/CD** > **Runners**. +2. You should see your newly registered runner listed under the **Specific Runners** section. + +### Configure the GitLab CI/CD pipeline + +1. Create/Edit the `.gitlab-ci.yml` file: + - Ensure your `.gitlab-ci.yml` file includes jobs with tags that match your runner’s tags. Refer to the configuration example below to picture what your file should look like: + ```yaml + stages: + - build + - test + + build: + stage: build + script: + - echo "Building the project..." + - # Add your build steps here + tags: + - k8s-runner + + test: + stage: test + script: + - echo "Running tests..." + - # Add your test steps here + tags: + - k8s-runner + ``` + +2. Push the configuration to GitLab: + - Push your `.gitlab-ci.yml` file to your GitLab repository: + ```bash + git add .gitlab-ci.yml + git commit -m "Add CI/CD pipeline configuration" + git push origin main + ``` + +### Monitor the pipeline + +Navigate to **CI/CD** > **Pipelines** in your GitLab project to view the status of your pipeline. + + + If the pipeline fails, you can check the logs of the GitLab Runner pod for more information: + ```bash + kubectl logs -n default + ``` + + +# Conclusion + +You have successfully set up a GitLab Runner hosted on Kubernetes and configured your GitLab CI/CD pipeline to use it. This setup allows you to leverage the scalability and flexibility of Kubernetes for your CI/CD workflows. + +For more detailed information on configuring your GitLab Runner, refer to the [official GitLab documentation](https://docs.gitlab.com/runner/install/kubernetes.html#configuring-gitlab-runner-using-the-helm-chart). \ No newline at end of file diff --git a/tutorials/easydeploy-gitlab-server/index.mdx b/tutorials/easydeploy-gitlab-server/index.mdx new file mode 100644 index 0000000000..6d7577b23c --- /dev/null +++ b/tutorials/easydeploy-gitlab-server/index.mdx @@ -0,0 +1,78 @@ +--- +meta: + title: Deploy GitLab Server on Scaleway Kubernetes clusters using Easy Deploy + description: Deploy GitLab server on Scaleway Kubernetes clusters with Easy Deploy. This guide provides steps for deployment and configurations for optimal GitOps practices. +content: + h1: Deploy GitLab Server on Scaleway Kubernetes clusters using Easy Deploy + paragraph: Deploy GitLab server on Scaleway Kubernetes clusters with Easy Deploy. This guide provides steps for deployment and configurations for optimal GitOps practices +tags: GitLab server kubernetes easy deploy +categories: + - containers +dates: + validation: 2024-06-20 + posted: 2024-06-20 +--- + +This tutorial provides a guide to deploy a GitLab server on Scaleway Kubernetes clusters using the Easy Deploy feature. +It outlines the prerequisites, step-by-step deployment instructions, and post-deployment configurations necessary for optimal continuous delivery and GitOps practices. + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a Scaleway Kubernetes [Kapsule](/containers/kubernetes/how-to/create-cluster/) or [Kosmos](/containers/kubernetes/how-to/create-kosmos-cluster/) cluster +- A domain name and access to its DNS zone + +## Deploying the GitLab Server application using Easy Deploy + +1. In the [Scaleway console](https://console.scaleway.com/), navigate to the **Kubernetes** section under **Containers**. +2. Select the cluster where you want to deploy the GitLab server. The **Cluster Information** tab will display. +3. Click the **Easy Deploy** tab to open the application dashboard. +4. Click **Deploy Application** to launch the deployment wizard. +5. Select **Application Library** to view the list of available applications. +6. Choose the **GitLab server** application. + + If you cannot find the GitLab server application on the first page, use the search bar or navigate through the library. + +7. Customize the default configuration for GitLab server using [Helm Charts](/tutorials/kubernetes-package-management-helm/). The default configuration looks as follows: + ```yaml + certmanager-issuer: + email: me@example.com + global: + hosts: + domain: gitlab.example.com + ``` + Replace the following parameters: + - `email`: Your email address. + - `domain`: Your domain name. + + The GitLab Server application is configured to use a `gitlab` subdomain. If you want your application running at `gitlab.example.com`, enter `example.com`. + +8. Enter a name (e.g., `gitlab-server`) and a Kubernetes namespace for your application. If no name is entered, GitLab server will be installed in the default namespace. +9. Click **Deploy Application** to deploy the GitLab server on your Kubernetes cluster. + +## Retrieving the GitLab Server root password + +1. Access the [Kubernetes Dashboard](/containers/kubernetes/how-to/access-kubernetes-dashboard/) of your cluster and navigate to **Secrets** under the **Config and Storage** section. +2. Click `gitlab-server-gitlab-initial-root-password` to display the application metadata. +3. Click the eye icon next to `password` to reveal and copy the GitLab server root password. + +## Connecting to GitLab Server + +GitLab server uses a Load Balancer to manage traffic. To check the deployment status, run: + +```bash +$ kubectl get svc +``` + +Look for the `gitlab-server-nginx-ingress-controller` service. Once the `EXTERNAL-IP` status changes from `` to an assigned IP, your GitLab server application is up. +Configure an A-record for the `gitlab` subdomain in your DNS zone, pointing to the Load Balancer IP. + +## Logging into GitLab Server + +1. Open your GitLab server subdomain in a web browser. +2. Enter **root** as the username and the password retrieved earlier to log in. + +## Additional resources + +For more detailed information on GitLab server configuration and metrics setup, refer to the [official GitLab server documentation](https://docs.gitlab.com/). \ No newline at end of file diff --git a/tutorials/easydeploy-grafana/index.mdx b/tutorials/easydeploy-grafana/index.mdx new file mode 100644 index 0000000000..a31b4076dd --- /dev/null +++ b/tutorials/easydeploy-grafana/index.mdx @@ -0,0 +1,72 @@ +--- +meta: + title: Deploy Grafana on Scaleway Kubernetes clusters using Easy Deploy + description: Use Grafana on Scaleway Kubernetes clusters with Easy Deploy. Unlock data visualization power and follow our step-by-step instructions for deployment and management. +content: + h1: Deploy Grafana on Scaleway Kubernetes clusters using Easy Deploy + paragraph: Use Grafana on Scaleway Kubernetes clusters with Easy Deploy. Unlock data visualization power and follow our step-by-step instructions for deployment and management. +tags: Grafana kubernetes easy deploy +categories: + - containers +dates: + validation: 2024-06-13 + posted: 2024-06-13 +--- + +Grafana is a powerful open-source platform for monitoring and observability, allowing users to visualize and analyze metrics from various data sources. +It provides interactive dashboards, alerts, and custom reports, making it invaluable for tracking system performance, diagnosing issues, and gaining insights into complex environments. +Grafana's flexibility and ease of use make it a popular choice for managing applications and infrastructure. + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a Scaleway Kubernetes [Kapsule](/containers/kubernetes/how-to/create-cluster/) or [Kosmos](/containers/kubernetes/how-to/create-kosmos-cluster/) cluster + +## Deploying the Grafana application using Easy Deploy + + +When configuring your Kubernetes cluster, note that certain applications and services, such as Grafana, may result in additional resources being provisioned. +For example, your YAML configuration might create Block Storage volumes or Load Balancers, which could incur extra costs. + + +1. In the [Scaleway console](https://console.scaleway.com/), navigate to the **Kubernetes** section under **Containers**. +2. Click the name of the cluster where you wish to deploy Grafana. The **Cluster Information** tab will display. +3. Click the **Easy Deploy** tab. The application dashboard displays. +4. Click **Deploy Application**. The application deployment wizard displays. +5. Choose **Application Library** to see the list of available applications. +6. Select the **Grafana** application. + + If you cannot find Grafana on the first page, use the search bar or navigate through the library. + +7. Optionally, customize the default configuration for Grafana using [Helm Charts](/tutorials/kubernetes-package-management-helm/). If you do not need any customized configuration you can skip this step. +8. Enter a name and a Kubernetes namespace for your application. If no name is entered, Grafana will be installed in the default namespace of the cluster. +9. Click **Deploy Application** to deploy Grafana on your Kubernetes cluster. + +## Retrieving the Grafana admin password + +1. Access the [Kubernetes Dashboard](/containers/kubernetes/how-to/access-kubernetes-dashboard/) of your cluster and navigate to **Secrets** under the **Config and Storage** section. +2. Select the name of your Grafana application to display its data. +3. Click the eye icon next to **admin-password** to reveal the Grafana admin password. Copy the password. + +## Connecting to Grafana + +Grafana uses a LoadBalancer to manage traffic. To check the deployment status, run: + +``` +$ kubectl get svc +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +application-silly-sammet-grafana LoadBalancer 10.34.223.177 51.159.xxx.yy 80:32483/TCP 35s +kubernetes ClusterIP 10.32.0.1 443/TCP 4h58m +``` + +Once the external IP status changes from `` to the assigned external IP, your Grafana application is up. Copy the IP address and paste it into a web browser. The Grafana login screen will appear. + +## Logging into Grafana + +1. Paste the external IP address of the LoadBalancer service into your web browser to open the Grafana login screen. +2. Enter **admin** as the username and the password retrieved in the previous step to log in. + +### Going further + +For more information about Grafana and setting up your metrics, refer to the [official Grafana documentation](https://grafana.com/docs/grafana/latest/) \ No newline at end of file diff --git a/tutorials/easydeploy-vault/index.mdx b/tutorials/easydeploy-vault/index.mdx new file mode 100644 index 0000000000..10397a664c --- /dev/null +++ b/tutorials/easydeploy-vault/index.mdx @@ -0,0 +1,188 @@ +--- +meta: + title: Deploy HashiCorp Vault on Scaleway Kubernetes clusters using Easy Deploy + description: Securely deploy and manage HashiCorp Vault on Scaleway Kubernetes clusters with Easy Deploy. Follow our guide for step-by-step instructions. +content: + h1: Deploy HashiCorp Vault on Scaleway Kubernetes clusters using Easy Deploy + paragraph: Securely deploy and manage HashiCorp Vault on Scaleway Kubernetes clusters with Easy Deploy. Follow our guide for step-by-step instructions. +tags: hashicorp vault kubernetes k8s easy deploy +categories: + - containers +dates: + validation: 2024-06-13 + posted: 2024-06-13 +--- + +HashiCorp Vault is an identity-based secrets and encryption management system. +It provides encryption services that are gated by authentication and authorization methods to ensure secure, auditable and restricted access to secrets. +Vault is used to secure, store and protect secrets and other sensitive data using a UI, CLI, or HTTP API. + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a Scaleway Kubernetes [Kapsule](/containers/kubernetes/how-to/create-cluster/) or [Kosmos](/containers/kubernetes/how-to/create-kosmos-cluster/) cluster + +## Deploying the Vault application using Easy Deploy + +1. In the [Scaleway console](https://console.scaleway.com/), navigate to the **Kubernetes** section under **Containers**. +2. Click the name of the cluster where you wish to deploy Grafana. The **Cluster Information** tab will display. +3. Click the **Easy Deploy** tab. The application dashboard displays. +4. Click **Deploy Application**. The application deployment wizard displays. +5. Choose **Application Library** to see the list of available applications. +6. Select the **Vault** application. + + If you cannot find Vault on the first page, use the search bar or navigate through the library. + +7. Optionally, customize the default configuration for Vault using [Helm Charts](/tutorials/kubernetes-package-management-helm/). If you do not need any customized configuration you can skip this step. +8. Enter a name and a Kubernetes namespace for your application. If no name is entered, Grafana will be installed in the default namespace of the cluster. +9. Click **Deploy Application** to deploy Grafana on your Kubernetes cluster. + +## Initializing and unsealing Vault + +1. Check the status of your Vault using the `kubectl` command. + ```sh + kubectl get pods -l app.kubernetes.io/name=vault + ``` + + If you choose another name for your Vault application ensure to replace the application name with the corresponding value. + + +2. Initialize Vault. Replace `vault-0` with the name of your application. If your application is called `vault-application` the value will be `vault-application-0`. + ```sh + kubectl exec -it vault-0 -- vault operator init + ``` + + Save the unseal keys and the initial root token provided by the command. + + +3. Unseal Vault using three unseal keys retrieved in the previous step: + ```sh + kubectl exec -it vault-0 -- vault operator unseal + kubectl exec -it vault-0 -- vault operator unseal + kubectl exec -it vault-0 -- vault operator unseal + ``` + +4. Login to Vault using the initial root token generated in step two: + ```sh + kubectl exec -it vault-0 -- vault login + ``` + +5. Enable the KV secrets engine at `secret/`: + ```sh + kubectl exec -it vault-0 -- vault secrets enable -path=secret kv-v2 + ``` + +## Configure Vault for Kubernetes authentication + +1. Enable Kubernetes authentication: + ```sh + kubectl exec -it vault-0 -- vault auth enable kubernetes + ``` + +2. Enter the Vault shell: + ```sh + kubectl exec -it vault-0 -- sh + ``` +3. Paste the following configuration to configure Vault with the Kubernetes API: + ``` + vault write auth/kubernetes/config \ + kubernetes_host="https://:443" \ + token_reviewer_jwt="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ + kubernetes_ca_cert="$(cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt)" + exit + ``` + Replace `` with the IP address of your Vault pod. You can retrieve it using the `kubectl get svc` command. The pod name corresponds to your application name (e.g. if your application is called vault-application, the pod name will be `application-vault`). + +4. Enter the Vault shell: + ```sh + kubectl exec -it vault-0 -- sh + ``` +5. Paste the following configuration to create a policy: + ```sh + vault policy write myapp-kv-ro -<