Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
Actions to create secret on K8S

I'm trying to create a secret in k8s using github actions like following (I've pre step which install lightweight k8s - k3s)

  - name: example tests
    shell: bash
    env:
      SUPER_SECRET: ${{ secrets.KUBECONFIG }}
   run: |
       kubectl create secret generic mysec --from-literal="$SUPER_SECRET" -n default

But I got error, any idea how to do it using github actions?

I use the settings->secrets and create a KUBECONFIG value and put the file content

in my local env I created a secret successfully with a kubeconfig file like:

 kubectl create secret generic mysec --from-file=./kubeconfig -n default

But in the CI I want to use it from the secret env in github ...

The error is: Error: Error: The process '/usr/local/bin/kubectl' failed with exit code 1

Error: ENAMETOOLONG: name too long, open '/home/runner/work/_temp/*** *** *** *** *** ***

What am I missing here?

I tried also with

kubectl create secret generic mysec --from-literal kubeconfig=$SUPER_SECRET -n default

If there is other way to make it work please let me know.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda