Jump to content
  • 0

Create readiness and liveness endpoints


Terry
 Share

Question

I would like to deploy Ant Media Server (Community Edition) to Kubernetes and set readiness and liveness endpoints for pods.

I added a new method in io/antmedia/console/rest/CommonRestService.java`

 

    public String healthCheck() {
        return "OK";
    }

And in io/antmedia/console/rest/RestService.java, I added

	@GET
	@Path("/healthCheck")
	@Produces(MediaType.TEXT_PLAIN)
	@Override
	public String healthCheck() {
		return "OK";
	}

And I tried to access  http://127.0.0.1:5080/rest/healthCheck , then got

image.png.e4c9081b70d7bf239a55e11005a8e1dd.png

 

Please send me a link of document to research or guide me what I was wrong.

 

P.S: I tried http://127.0.0.1:5080/rest/getVersion and got same repsonse

Edited by Terry
Updated link and added PS
Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

3 answers to this question

Recommended Posts

  • 0

@Terry
1. It is also valid. You need to call it like http://IP-address:5080/rest/getVersion.
Also to call Management Rest APIs, you need to authenticate first using this Rest API.

2. To call application/broadcasts Rest APIs you need to whitelist your IP in Rest filter.

3. Yes, it is expected. To allow all IPs you need to whitelist whole CIDR block 0.0.0.0/0.

4. You can run a standalone server, but you can't scale it because the community edition doesn't support the cluster feature.

Link to comment
Share on other sites

  • 0

Hi @Terry
I hope you are fine.
Unfortunately, Kubernetes support is not available in the Community Edition as there is no clustering feature. In order to deploy cluster using Kubernetes, you need to use an Enterprise Edition.

To get the Ant media server version you can check this Rest API
 

Link to comment
Share on other sites

  • 0
10 hours ago, Yash said:

Hi @Terry
I hope you are fine.
Unfortunately, Kubernetes support is not available in the Community Edition as there is no clustering feature. In order to deploy cluster using Kubernetes, you need to use an Enterprise Edition.

To get the Ant media server version you can check this Rest API
 

Thank you for responding, @Yash. I have some more concerns:

  1. Is API https://antmedia.io/rest/#/default/getVersion deprecated?
  2. "127.0.0.1" is already added in REST IP Filter, but API response is "Not Allowed IP". How can I log access request to get current IP of requester client?
  3. When I log into Admin page and add IP "0.0.0.0" into REST IP Filters and hope it will allow all IP addresses, the server still responses "Not Allowed IP". Is it expected? I turned off Filter, server responses OK.
  4. When I mentioned "deploy to Kubernetes", I meant I would like to use docker image and deploy Ant Media Server as a pod on Kubernetes, this is possible, am I correct?

There is another issue, I build Docker image from zip file that I downloaded from release base then it's OK. But, when I build with the zip file that I repackage from source code, I always get 404 Not Found, even if for webiste. <- I'm investigating this issue

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...