Today I wanted to apply the official metrics-server manifest from a URL instead of from a local file or a file copied to my remote Kubernetes cluster server.
I noticed the documentation lacks any examples of URL-based deployments, so I think we should add an example to show how to do it.
Then I realized I'm not even sure if there's a way using a lookup with url or any other way to directly apply a manifest from a URL... here's how I'm doing it in my current playbook:
- name: Download metrics-server manifest to the cluster.
get_url:
url: https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
dest: ~/metrics-server.yaml
mode: '0664'
- name: Apply metrics-server manifest to the cluster.
k8s:
state: present
src: ~/metrics-server.yaml
So... first of all is it possible to apply direct from a URL? And if not, maybe we at least document how to do it this way (download, then apply).
@geerlingguy For now, I documented the current way of downloading and applying the manifest. In near future we may consider adding this functionality. PR welcome.
SUMMARY
Today I wanted to apply the official
metrics-server
manifest from a URL instead of from a local file or a file copied to my remote Kubernetes cluster server.I noticed the documentation lacks any examples of URL-based deployments, so I think we should add an example to show how to do it.
Then I realized I'm not even sure if there's a way using a
lookup
withurl
or any other way to directly apply a manifest from a URL... here's how I'm doing it in my current playbook:So... first of all is it possible to apply direct from a URL? And if not, maybe we at least document how to do it this way (download, then apply).
ISSUE TYPE
COMPONENT NAME
k8s
ANSIBLE VERSION
Any.