Skip to content

Instantly share code, notes, and snippets.

@ironcladlou
Last active August 10, 2017 18:40
Show Gist options
  • Save ironcladlou/edfe8016208ca4900cdc0e6e858ca989 to your computer and use it in GitHub Desktop.
Save ironcladlou/edfe8016208ca4900cdc0e6e858ca989 to your computer and use it in GitHub Desktop.
$ /usr/local/opt/curl/bin/curl -k --cert /var/run/kubernetes/client-admin.crt --key /var/run/kubernetes/client-admin.key --cacert /var/run/kubernetes/client-ca.crt -H 'Accept: application/json;as=PartialObjectMetadata;v=v1alpha1;g=meta.k8s.io' https://localhost:6443/api/v1/namespaces/kube-system/configmaps/kube-dns
{
"kind": "PartialObjectMetadata",
"apiVersion": "meta.k8s.io/v1alpha1",
"metadata": {
"name": "kube-dns",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/configmaps/kube-dns",
"uid": "adce7608-7df6-11e7-a55a-acbc32bcadbb",
"resourceVersion": "162",
"creationTimestamp": "2017-08-10T18:06:48Z",
"labels": {
"addonmanager.kubernetes.io/mode": "EnsureExists"
}
}
}
$ /usr/local/opt/curl/bin/curl -k --cert /var/run/kubernetes/client-admin.crt --key /var/run/kubernetes/client-admin.key --cacert /var/run/kubernetes/client-ca.crt -H 'Accept: application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io' https://localhost:6443/api/v1/namespaces/kube-system/configmaps
{
"kind": "PartialObjectMetadataList",
"apiVersion": "meta.k8s.io/v1alpha1",
"items": [
{
"kind": "PartialObjectMetadata",
"apiVersion": "meta.k8s.io/v1alpha1",
"metadata": {
"name": "extension-apiserver-authentication",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/configmaps/extension-apiserver-authentication",
"uid": "abb31c89-7df6-11e7-a55a-acbc32bcadbb",
"resourceVersion": "6",
"creationTimestamp": "2017-08-10T18:06:45Z"
}
},
{
"kind": "PartialObjectMetadata",
"apiVersion": "meta.k8s.io/v1alpha1",
"metadata": {
"name": "kube-dns",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/configmaps/kube-dns",
"uid": "adce7608-7df6-11e7-a55a-acbc32bcadbb",
"resourceVersion": "162",
"creationTimestamp": "2017-08-10T18:06:48Z",
"labels": {
"addonmanager.kubernetes.io/mode": "EnsureExists"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment