Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build kubectl-ng #501

Open
jacobtomlinson opened this issue Oct 2, 2024 · 0 comments
Open

Build kubectl-ng #501

jacobtomlinson opened this issue Oct 2, 2024 · 0 comments

Comments

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Oct 2, 2024

Which project are you requesting an enhancement for?

kr8s

What do you need?

A core goal of kr8s is to provide an experience similar to using kubectl in Python. That means the Python code should be minimal, clean and user focused. There should be no boilerplate code and we should avoid Kubernetes API implementation details from leaking into the code.

To ensure that kr8s has all of the features of kubectl and that the API design matches the expectations folks would bring over from kubectl I started playing around with the kubectl-ng example. This example is a reimplementation of kubectl in Python and uses kr8s as a dependency for interacting with Kubernetes. The goal here is that if we can reimplement kubectl in Python using kr8s then we can ensure that kr8s covers all the came features as kubectl.

To make this more fun I also started playing around with rich which is an awesome library for making beautiful terminal text output in Python. Inspired by projects like k9s I've started playing around with trying to make kubectl-ng more beautiful and interactive at the same time.

As kr8s has matured my tinkering on kubectl-ng has slowed down. But it would be really fun to continue pushing on this so I'm opening a top level issue to track implementing each subcommand from kubectl in kubectl-ng.

Goals:

  • Learn more about the Kubernetes API and how kubectl interacts with it
  • Find bugs and build out missing functionality in kr8s
  • Play with libraries like rich and typer
  • Spend time thinking about CLI tool design and how we can make them more beautiful

Non-goals:

  • Pairity with kubectl. We aren't trying to replace kubectl, just learn from it and tinker.

List of subcommands

  • Implement kubectl-ng annotate
  • Implement kubectl-ng api-resources
  • Implement kubectl-ng api-versions
  • Implement kubectl-ng apply
  • Implement kubectl-ng apply edit-last-applied
  • Implement kubectl-ng apply set-last-applied
  • Implement kubectl-ng apply view-last-applied
  • Implement kubectl-ng attach
  • Implement kubectl-ng auth
  • Implement kubectl-ng auth can-i
  • Implement kubectl-ng auth reconcile
  • Implement kubectl-ng auth whoami
  • Implement kubectl-ng autoscale
  • Implement kubectl-ng certificate
  • Implement kubectl-ng certificate approve
  • Implement kubectl-ng certificate deny
  • Implement kubectl-ng cluster-info
  • Implement kubectl-ng cluster-info dump
  • Implement kubectl-ng completion
  • Implement kubectl-ng config
  • Implement kubectl-ng config current-context
  • Implement kubectl-ng config delete-cluster
  • Implement kubectl-ng config delete-context
  • Implement kubectl-ng config delete-user
  • Implement kubectl-ng config get-clusters
  • Implement kubectl-ng config get-contexts
  • Implement kubectl-ng config get-users
  • Implement kubectl-ng config rename-context
  • Implement kubectl-ng config set
  • Implement kubectl-ng config set-cluster
  • Implement kubectl-ng config set-context
  • Implement kubectl-ng config set-credentials
  • Implement kubectl-ng config unset
  • Implement kubectl-ng config use-context
  • Implement kubectl-ng config view
  • Implement kubectl-ng cordon
  • Implement kubectl-ng cp
  • Implement kubectl-ng create
  • Implement kubectl-ng create clusterrole
  • Implement kubectl-ng create clusterrolebinding
  • Implement kubectl-ng create configmap
  • Implement kubectl-ng create cronjob
  • Implement kubectl-ng create deployment
  • Implement kubectl-ng create ingress
  • Implement kubectl-ng create job
  • Implement kubectl-ng create namespace
  • Implement kubectl-ng create poddisruptionbudget
  • Implement kubectl-ng create priorityclass
  • Implement kubectl-ng create quota
  • Implement kubectl-ng create role
  • Implement kubectl-ng create rolebinding
  • Implement kubectl-ng create secret
  • Implement kubectl-ng create secret docker-registry
  • Implement kubectl-ng create secret generic
  • Implement kubectl-ng create secret tls
  • Implement kubectl-ng create service
  • Implement kubectl-ng create service clusterip
  • Implement kubectl-ng create service externalname
  • Implement kubectl-ng create service loadbalancer
  • Implement kubectl-ng create service nodeport
  • Implement kubectl-ng create serviceaccount
  • Implement kubectl-ng create token
  • Implement kubectl-ng debug
  • Implement kubectl-ng delete
  • Implement kubectl-ng describe
  • Implement kubectl-ng diff
  • Implement kubectl-ng drain
  • Implement kubectl-ng edit
  • Implement kubectl-ng events
  • Implement kubectl-ng exec
  • Implement kubectl-ng explain
  • Implement kubectl-ng expose
  • Implement kubectl-ng get
  • Implement kubectl-ng kustomize
  • Implement kubectl-ng label
  • Implement kubectl-ng logs
  • Implement kubectl-ng options
  • Implement kubectl-ng patch
  • Implement kubectl-ng plugin
  • Implement kubectl-ng plugin list
  • Implement kubectl-ng port-forward
  • Implement kubectl-ng proxy
  • Implement kubectl-ng replace
  • Implement kubectl-ng rollout
  • Implement kubectl-ng rollout history
  • Implement kubectl-ng rollout pause
  • Implement kubectl-ng rollout restart
  • Implement kubectl-ng rollout resume
  • Implement kubectl-ng rollout status
  • Implement kubectl-ng rollout undo
  • Implement kubectl-ng run
  • Implement kubectl-ng scale
  • Implement kubectl-ng set
  • Implement kubectl-ng set env
  • Implement kubectl-ng set image
  • Implement kubectl-ng set resources
  • Implement kubectl-ng set selector
  • Implement kubectl-ng set serviceaccount
  • Implement kubectl-ng set subject
  • Implement kubectl-ng taint
  • Implement kubectl-ng top
  • Implement kubectl-ng top node
  • Implement kubectl-ng top pod
  • Implement kubectl-ng uncordon
  • Implement kubectl-ng version #502
  • Implement kubectl-ng wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant