question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I run kubectl apply-f using the API

See original GitHub issue

I tried using the Kubernetes API python to execute the kubect apply command to deploy and update resources

the kubectl command is as follows:

kubectl apply -f export

export is a folder containing multiple yaml files, which is generated by kompose convert -o export

I only found an alternative API for kubectl create, but I didn’t find apply

How do I implement kubectl apply to create resources and possible subsequent updates

If you know, please let me know. thank you in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
adammrozikcommented, Feb 19, 2021

Hey! Is there any chance this would be implemented in the future?

Not sure how to effectively mimic kubectl apply behaviour with current API

5reactions
solarmosaic-kflorencecommented, Nov 16, 2020

@tvkit i’m sure it is, but it doesn’t have a lot to do with the apply functionality that kubectl provides. And I’d rather not use python just to call a CLI command… kind of defeats the purpose of using python.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access Clusters Using the Kubernetes API
To use Python client, run the following command: pip install kubernetes . See Python Client Library page for more installation options. The ...
Read more >
Kubernetes API call equivalent to 'kubectl apply' - Stack Overflow
I've found it to be a good way to get a quick overview of what calls any similar API code will need to...
Read more >
Using and Understanding the Kubernetes API - ContainIQ
The easiest way to get started with the Kubernetes API is by using kubectl. Run kubectl proxy --port=8080, and as long as the...
Read more >
kubectl apply - Kubernetes
Apply the configuration in pod.json to a pod. kubectl apply -f . ... user to use --username="": Username for basic authentication to the...
Read more >
How To Call Kubernetes API using Simple HTTP Client - iximiuz
Calling Kubernetes API using kubectl proxy ... With a properly configured kubectl tool, you can greatly simplify the API access by using the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found