-
Notifications
You must be signed in to change notification settings - Fork 126
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
Example for create object from file via dynamic API #10
Comments
There might be an alternative solution - check out the "Read Kubernetes Manifests Into Go Structs" section of this article of mine. And here is the corresponding mini-program from this repo. Hope this helps! |
@iximiuz |
@yuzhichang Here is an example of how to type-cast a |
I've figured out the reason of error The complete code is the following:
|
It's good that you figured it out. At the same time, it seems like you're reinventing the wheel. The module Also, beware that |
I need code to create object from file just like
kubectl
since I don't want to depend onkubectl
executable.The following code works for creating
Deployment
,Service
etc but not work forClusterRole
,ClusterRoleBind
etc. The error is:client.Resource.Namespace.Create failed: the server could not find the requested resource
.Could you help to fix it?
The text was updated successfully, but these errors were encountered: