Skip to content

Generating Kubernetes Resource Configurations in an Interactive CLI

License

Notifications You must be signed in to change notification settings

wingkwong/k8sgen

Repository files navigation

k8sgen

k8sgen is an utility which is designed to guide users to build their Kubernetes resources in an interactive CLI.

Build Status Stability:Experimental License: MIT Go Report Card

Usage

k8sgen jumpstart - jumpstart a resource file

This command utilises kubectl to create a jumpstart version of a resource file.

k8sgen jumpstart

 _    ___                       
| | _( _ ) ___  __ _  ___ _ __  
| |/ / _ \/ __|/ _  |/ _ | |_ \ 
|   | (_) \__ | (_| |  __| | | |
|_|\_\___/|___/\__, |\___|_| |_|
                |___/

? What kind of object you want to create? [Use arrows to move, type to filter]
  ClusterRole
  ClusterRoleBinding
  Configmap
> Deployment
  Job
  Namespace
  PodDisruptionBudget
  PriorityClass
  Quota
  Role
  RoleBinding
  Secret
  Service
  ServiceAccount

? What deployment you want to name? my-deployment

? What image you want to name to run? busybox

? Please select an output format yaml
  json
> yaml

? What directory you want to save? /home/wingkwong/deployment.yaml

Result:

apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: my-deployment
  name: my-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-deployment
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: my-deployment
    spec:
      containers:
      - image: busybox
        name: busybox
        resources: {}
status: {}

Contributing

The k8sgen project adheres to the CNCF Code of Conduct.

We welcome community contributions and pull requests.

License

MIT

About

Generating Kubernetes Resource Configurations in an Interactive CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published