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

Add introductory notebook #272

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

djkonro
Copy link
Contributor

@djkonro djkonro commented Jun 28, 2017

This notebook shows how to manage kubernetes objects using
common resource operations with the python client

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 28, 2017
@djkonro
Copy link
Contributor Author

djkonro commented Jun 28, 2017

This is a sample view of the notebook http://djimeli.me/notebooks/intro_notebook.html

Copy link
Contributor

@sebgoa sebgoa left a 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",
Copy link
Contributor

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",
Copy link
Contributor

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"
Copy link
Contributor

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",
Copy link
Contributor

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.

This notebook shows how to manage kubernetes objects using
common resource operations with the python client
@sebgoa
Copy link
Contributor

sebgoa commented Jul 7, 2017

/lgtm

@mbohlool

@mbohlool mbohlool merged commit 8b988ba into kubernetes-client:master Jul 7, 2017
yliaog pushed a commit to yliaog/client-python that referenced this pull request Jan 8, 2022
…rncode-idempotent

fix: WSClient.returncode not idempotent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants