-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.http
91 lines (76 loc) · 2.95 KB
/
k8s.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Use following command:
# kubectl config view --raw
#
# Extract target environment "client-key-data"
# and base64 decode it to ".vscode/client.key"
# Or use following command:
# kubectl config view --raw -o jsonpath='{.users[?(@.name == "docker-desktop")].user.client-key-data}' | base64 --decode
#
# Extract target environment "client-certificate-data"
# and base64 decode it to ".vscode/client.crt"
# Or use following command:
# kubectl config view --raw -o jsonpath='{.users[?(@.name == "docker-desktop")].user.client-certificate-data}' | base64 --decode
#
# Create following file to ".vscode/settings.json":
# {
# "rest-client.certificates": {
# "kubernetes.docker.internal:6443": {
# "cert": ".vscode/client.crt",
# "key": ".vscode/client.key"
# }
# }
# }
#
@endpoint = https://kubernetes.docker.internal:6443
### Fetch paths
GET {{endpoint}}/ HTTP/1.1
Content-Type: application/json; charset=utf-8
### Fetch version
GET {{endpoint}}/version HTTP/1.1
Content-Type: application/json; charset=utf-8
### Health endpoints (https://kubernetes.io/docs/reference/using-api/health-checks/)
GET {{endpoint}}/livez?verbose HTTP/1.1
Content-Type: application/json; charset=utf-8
### Health endpoints (https://kubernetes.io/docs/reference/using-api/health-checks/)
GET {{endpoint}}/readyz?verbose HTTP/1.1
Content-Type: application/json; charset=utf-8
### API resource list - v1
GET {{endpoint}}/api/v1 HTTP/1.1
Content-Type: application/json; charset=utf-8
### Fetch namespace list
GET {{endpoint}}/api/v1/namespaces HTTP/1.1
Content-Type: application/json; charset=utf-8
### Create namespace "shiny"
POST {{endpoint}}/api/v1/namespaces HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"metadata": {
"name": "shiny"
}
}
### Delete namespace "shiny"
DELETE {{endpoint}}/api/v1/namespaces/shiny HTTP/1.1
Content-Type: application/json; charset=utf-8
### Fetch default namespace
GET {{endpoint}}/api/v1/namespaces/default HTTP/1.1
Content-Type: application/json; charset=utf-8
### Fetch pod list
GET {{endpoint}}/api/v1/pods HTTP/1.1
Content-Type: application/json; charset=utf-8
### API resource list - apps/v1
GET {{endpoint}}/apis/apps/v1 HTTP/1.1
Content-Type: application/json; charset=utf-8
### Fetch deployment list
GET {{endpoint}}/apis/apps/v1/deployments HTTP/1.1
Content-Type: application/json; charset=utf-8
### Deprecation: Fetch deployment list
# https://github.com/JanneMattila/QuizMaker/blob/c2287a66406433712bebe6e45ebdfff35e390a8b/src/QuizUserSimulator/quizsim.yaml#L6-L7
# Previously was "extensions/v1beta1", "apps/v1beta1", "apps/v1beta2"
# Now is "apps/v1"
#
# Example API deprecation:
# https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
# Release notes:
# https://kubernetes.io/docs/setup/release/notes/
GET {{endpoint}}/apis/extensions/v1beta1/deployments HTTP/1.1
Content-Type: application/json; charset=utf-8