Saturday 5th August 2017
- Studied alot about the swagger specification and swagger specification extensions
- Studied source code for files related to Add GroupVersionKind extension to OpenAPI operations by mbohlool
Saturday 5th August 2017
| ''' | |
| intro.py | |
| Managing kubernetes objects using common resource operations with the python client | |
| ----------------------------------------------------------------------------------------------- | |
| Some of this operations include; | |
| - **`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`. | |
| from kubernetes import client, config | |
| config.load_kube_config() | |
| # create an instance of the API class | |
| api_instance = client.CoreV1Api() | |
| service = client.V1Service() | |
| from kubernetes import client, config | |
| config.load_kube_config() | |
| extensions = client.ExtensionsV1beta1Api() | |
| deployment = client.models.extensions_v1beta1_deployment.ExtensionsV1beta1Deployment() | |
| namespace = 'default' | |
| deployment.api_version = 'extensions/v1beta1' |
| #include <iostream> | |
| using namespace std; | |
| int main(void) | |
| { | |
| for(int i = 1; i <= 100; i++){ | |
| if ((i % 3 == 0) && (i % 5 == 0)) { | |
| cout << "CracklePop" << endl; | |
| } else if (i % 3 == 0) { |