If php is installed in /usr/bin
, you can run direclty
pkc.phar
Alternatively, you can run
php pkc.phar
or 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:
pkc
if 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.35s
but this footer part is not mentioned in samples below.
Input:
pkc.phar app:get-namespace samplenamespace
Output:
Namespace samplenamespace is Active and has 14d
Input:
pkc.phar app:get-resourcequota samplenamespace
Output:
Namespace samplenamespace was created at 2019-08-22T16:05:00Z
Input:
pkc.phar app:get-pods samplenamespace
Output:
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=6d11h
Input:
pkc.phar app:get-replicasets samplenamespace
Output:
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=5h44m
Input:
pkc.phar app:get-volumes samplemodule
Output:
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=10d
Input:
pkc.phar app:create-pod path-to-yaml-file
Output:
pod/nginx-sample created
Input:
pkc.phar app:delete-pod samplenamespace samplemmodule
Output:
pod "nginx-sample" deleted
First, change phar.readonly to Off
Then, run
vendor/bin/phing
Finally, 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