If php is installed in /usr/bin, you can run direclty
pkc.pharAlternatively, you can run
php pkc.pharor create a symlink to your php in /usr/bin.
You can move pkc.phar to /usr/bin as pck, so you can run it as a command:
pkcif php.exe is declared in PATH environment variable, you can run it so:
php.exe pkc.phar
You can create a .BAT file that contains this call.
samplenamespace is the variable argument that you must provide, a Kubernetes valid namespace.
All output shows elapsed time like:
Elapsed time: 0.35sbut this footer part is not mentioned in samples below.
Input:
pkc.phar app:get-namespace samplenamespaceOutput:
Namespace samplenamespace is Active and has 14dInput:
pkc.phar app:get-resourcequota samplenamespaceOutput:
Namespace samplenamespace was created at 2019-08-22T16:05:00ZInput:
pkc.phar app:get-pods samplenamespaceOutput:
Namespace samplenamespace
pod=podsample1 ready=1/1 status=Running restarts=0 age=6d11h
pod=podsample2 ready=1/1 status=Running restarts=0 age=6d11h
pod=podsample3 ready=1/1 status=Running restarts=0 age=6d11hInput:
pkc.phar app:get-replicasets samplenamespaceOutput:
Namespace samplenamespace
name=backend1 desired=0 current=0 ready=0 age=16d
name=backend2 desired=2 current=2 ready=2 age=15d
name=frontend1 desired=0 current=0 ready=0 age=15d
name=frontend2 desired=1 current=1 ready=1 age=13d
name=nginx-sample1 desired=1 current=0 ready=0 age=12d
name=nginx-sample2 desired=1 current=0 ready=0 age=12d
name=nginx-sample3 desired=1 current=0 ready=0 age=12d
name=nginx-sample4 desired=1 current=0 ready=0 age=12d
name=nginx-sample5 desired=1 current=0 ready=0 age=12d
name=teste-sample desired=1 current=1 ready=0 age=5h44mInput:
pkc.phar app:get-volumes samplemoduleOutput:
Module samplemodule
pod=backend-sample1 ready=1/1 status=Running restarts=0 age=10d
pod=backend-sample2 ready=1/1 status=Running restarts=0 age=10dInput:
pkc.phar app:create-pod path-to-yaml-fileOutput:
pod/nginx-sample createdInput:
pkc.phar app:delete-pod samplenamespace samplemmoduleOutput:
pod "nginx-sample" deleted
First, change phar.readonly to Off
Then, run
vendor/bin/phingFinally, change phar.readonly to On [DON'T FORGET IT]
pkc.phar no arguments
pkc.phar app:get-namespace
pkc.phar app:get-resourcequota
pkc.phar app:get-pods
pkc.phar app:get-replicasets
pkc.phar app:get-volumes
pkc.phar app:create-pod
pkc.phar app:delete-pod







