Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Add example k8s usage to apply manifest from URL #352

Closed
geerlingguy opened this issue Jan 26, 2021 · 2 comments
Closed

Add example k8s usage to apply manifest from URL #352

geerlingguy opened this issue Jan 26, 2021 · 2 comments
Labels
type/documentation Improvements or additions to documentation type/enhancement New feature or request verified The issue is reproduced

Comments

@geerlingguy
Copy link
Collaborator

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 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).

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

k8s

ANSIBLE VERSION

Any.

@Akasurde
Copy link
Member

Akasurde commented Feb 3, 2021

@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.

@Akasurde
Copy link
Member

Akasurde commented Feb 3, 2021

resolved_by_pr #359

@Akasurde Akasurde added type/documentation Improvements or additions to documentation type/enhancement New feature or request verified The issue is reproduced and removed needs_verify labels Feb 3, 2021
Akasurde added a commit that referenced this issue Feb 3, 2021
Fixes: #352

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/documentation Improvements or additions to documentation type/enhancement New feature or request verified The issue is reproduced
Projects
None yet
Development

No branches or pull requests

3 participants