Skip to content

gabriellimoni/learn-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API endpoints

The examples below are after applying the wordpress setup in this repo.

First of all we need to define which namespace we are working on. For the examples we'll use the default.

Secondly, if using minikube run kubectl proxy --port=8080 to setup your cluster proxy.

  1. List nodes: http://127.0.0.1:8080/api/v1/nodes
  2. List services: http://127.0.0.1:8080/api/v1/namespaces/default/services/
  3. Get service: http://127.0.0.1:8080/api/v1/namespaces/default/services/wordpress
  4. List pods from service via labelSelector: http://127.0.0.1:8080/api/v1/namespaces/default/pods?labelSelector=tier=frontend,app=wordpress
  5. List deployments: http://127.0.0.1:8080/apis/apps/v1/namespaces/default/deployments
  6. Get deployment: http://127.0.0.1:8080/apis/apps/v1/namespaces/default/deployments/wordpress
  7. List replica sets via labelSelector: http://127.0.0.1:8080/apis/apps/v1/namespaces/default/replicasets?labelSelector=app=wordpress,tier=frontend

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published