-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add introductory notebook #272
Conversation
This is a sample view of the notebook http://djimeli.me/notebooks/intro_notebook.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this notebook, just correct a few sentences and add a command to that buysbox pod so that it does not crash.
"Managing kubernetes objects using common resource operations with the python client\n", | ||
"-----------------------------------------------------------------------------------------------\n", | ||
"\n", | ||
"Some of this operations include;\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of "these" operations
"\n", | ||
"Some of this operations include;\n", | ||
"\n", | ||
"- **`create_xxxx`** : create a resource object. Ex **`create_namespaced_pod`** and **`create_namespaced_deployment`**, for creation of pods and deployments respectively. This performs operations similar to `kubectl create`.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't write kubectl create
in bold, but the other sentences you do. Try to be consistent.
"editable": true | ||
}, | ||
"source": [ | ||
"### Create API and object instances" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create API endpoint instance as well as API resource instances (body and specification).
"dep.spec = spec\n", | ||
"\n", | ||
"container=client.V1Container()\n", | ||
"container.image=\"busybox:1.26.1\"\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your pod will actually crash because busybox does not run a default command. Either you switch to something like an nginx image, or you add a command like sleep 3600
to make the busybox container actually run. Otherwise people will see pod enter a crashloop backoff.
b7bf8a5
to
cc6c661
Compare
This notebook shows how to manage kubernetes objects using common resource operations with the python client
/lgtm |
…rncode-idempotent fix: WSClient.returncode not idempotent
This notebook shows how to manage kubernetes objects using
common resource operations with the python client