https://github.com/okteto/namespace
Github action to activate a namespace in Okteto and download the corresponding kubeconfig
https://github.com/okteto/namespace
cloud-computing github-actions kubernetes microservices okteto
Last synced: about 1 month ago
JSON representation
Github action to activate a namespace in Okteto and download the corresponding kubeconfig
- Host: GitHub
- URL: https://github.com/okteto/namespace
- Owner: okteto
- License: apache-2.0
- Created: 2020-05-27T22:55:44.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-03-25T13:53:46.000Z (3 months ago)
- Last Synced: 2026-03-26T04:47:09.678Z (3 months ago)
- Topics: cloud-computing, github-actions, kubernetes, microservices, okteto
- Language: Shell
- Homepage:
- Size: 81.1 KB
- Stars: 7
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
# GitHub Actions for Okteto
## Automate your development workflows using Github Actions and Okteto
GitHub Actions gives you the flexibility to build automated software development workflows. With GitHub Actions for Okteto you can create workflows to build, deploy and update your applications in [Okteto](https://okteto.com).
Try Okteto for free for 30 days, no credit card required. [Start your 30-day trial now](https://www.okteto.com/free-trial/)!
# Github Action for Activating a Namespace in Okteto
You can use this action to activate a namespace in Okteto, download the corresponding kubeconfig and set it as the current context.
## Inputs
### `namespace`
The namespace to activate. If empty, it will use your personal namespace.
### `log-level`
Log level used. Supported values are: `debug`, `info`, `warn`, `error`. (defaults to warn)
## Outputs
### `kubeconfig`
The path to the generated `kubeconfig` file.
# Example
This example runs the context action and then activates a namespace.
```yaml
# File: .github/workflows/workflow.yml
on: [push]
name: example
jobs:
devflow:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- uses: okteto/context@latest
with:
url: https://okteto.example.com
token: ${{ secrets.OKTETO_TOKEN }}
- name: "Create development environments namespace"
uses: okteto/namespace@latest
with:
namespace: devenvs-cindylopez
```
## Advanced usage
### Custom Certification Authorities or Self-signed certificates
You can specify a custom certificate authority or a self-signed certificate by setting the `OKTETO_CA_CERT` environment variable. When this variable is set, the action will install the certificate in the container, and then execute the action.
Use this option if you're using a private Certificate Authority or a self-signed certificate in your [Okteto SH](https://www.okteto.com/docs/self-hosted/) instance. We recommend that you store the certificate as an [encrypted secret](https://docs.github.com/en/actions/reference/encrypted-secrets), and that you define the environment variable for the entire job, instead of doing it on every step.
```yaml
# File: .github/workflows/workflow.yml
on: [push]
name: example
jobs:
devflow:
runs-on: ubuntu-latest
env:
OKTETO_CA_CERT: ${{ secrets.OKTETO_CA_CERT }}
steps:
- name: checkout
uses: actions/checkout@master
- uses: okteto/context@latest
with:
url: https://okteto.example.com
token: ${{ secrets.OKTETO_TOKEN }}
- name: "Create development environments namespace"
uses: okteto/namespace@latest
with:
namespace: devenvs-cindylopez
```