Re: How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-30 Thread touseef

The issue is  i run my application on kubernetes  infrastructure which is 
not mainatined by me.However in case of issue i want some logs to debug It 
would have been straight forward if i had an access to the cluster via 
kubectl commands but that not the case, i.e why i some how want to get the 
log of the containers in which my application run in case i need it to 
debug  

On Thursday, 29 October 2020 at 21:20:42 UTC+5:30 davidmic...@gmail.com 
wrote:

> In general, it would be pretty silly if anyone could get access to the 
> internals of a pod if they didn't have the proper authentication.
>
> Is your enterprise using Jenkins to build the applications that you deploy 
> to kubernetes?  Are those builds using kubectl to do those deployments?  If 
> you can see the command lines in the build output, you can see how 
> authentication is done. If that information is visible, then the enterprise 
> likely considers anyone who can see that information to be trusted to 
> access those pods for diagnostic information, so you should be able to do 
> the same thing.
>
> On Thursday, October 29, 2020 at 7:50:32 AM UTC-7 Kari Atari wrote:
>
>> Not sure if this would help, since I'm using Docker, not K8, but I bet 
>> there's a similar option - when I a start a container I use a -v flag to 
>> specify to copy the logs to the server it's running on.  This allows me to 
>> have a persistent log that won't just go away if I remove and restart the 
>> container.
>>
>> example:
>> -v /path/to/server/log/directory:/path/from/container/logs/directory
>>
>>
>> On Wed, Oct 28, 2020 at 11:43 PM touseef  wrote:
>>
>>> Can anyone provide pointer on  how do i get the logs of the containers 
>>> running in kubernetes without using Kubectl because i dont have an access 
>>> to the kubernetes cluster.
>>> Is there any loging mechanism by which i can get the logs or stdout in 
>>> the container to jenkins ? Help would be greatly appreciated.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/3b38d046-c55e-4e55-b9c3-7bc1d333a821n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c2911e42-b06a-462c-98fc-60ed18dd31dan%40googlegroups.com.


Re: How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-30 Thread touseef

The issue is  i run my application on kubernetes  infrastructure which is 
not mainatined by me.However in case of issue i want some logs to debug the 
issue.It would have been straight forward if i had an access to the cluster 
via kubectl commands but that not the case, thats why i some how want to 
get the log of the contianers in which my application run in case i need it 
to bebug
On Thursday, 29 October 2020 at 21:20:42 UTC+5:30 davidmic...@gmail.com 
wrote:

> In general, it would be pretty silly if anyone could get access to the 
> internals of a pod if they didn't have the proper authentication.
>
> Is your enterprise using Jenkins to build the applications that you deploy 
> to kubernetes?  Are those builds using kubectl to do those deployments?  If 
> you can see the command lines in the build output, you can see how 
> authentication is done. If that information is visible, then the enterprise 
> likely considers anyone who can see that information to be trusted to 
> access those pods for diagnostic information, so you should be able to do 
> the same thing.
>
> On Thursday, October 29, 2020 at 7:50:32 AM UTC-7 Kari Atari wrote:
>
>> Not sure if this would help, since I'm using Docker, not K8, but I bet 
>> there's a similar option - when I a start a container I use a -v flag to 
>> specify to copy the logs to the server it's running on.  This allows me to 
>> have a persistent log that won't just go away if I remove and restart the 
>> container.
>>
>> example:
>> -v /path/to/server/log/directory:/path/from/container/logs/directory
>>
>>
>> On Wed, Oct 28, 2020 at 11:43 PM touseef  wrote:
>>
>>> Can anyone provide pointer on  how do i get the logs of the containers 
>>> running in kubernetes without using Kubectl because i dont have an access 
>>> to the kubernetes cluster.
>>> Is there any loging mechanism by which i can get the logs or stdout in 
>>> the container to jenkins ? Help would be greatly appreciated.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/3b38d046-c55e-4e55-b9c3-7bc1d333a821n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e0ad601f-b720-449b-b909-9b92b0fa9051n%40googlegroups.com.


Re: How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-29 Thread David Karr
In general, it would be pretty silly if anyone could get access to the 
internals of a pod if they didn't have the proper authentication.

Is your enterprise using Jenkins to build the applications that you deploy 
to kubernetes?  Are those builds using kubectl to do those deployments?  If 
you can see the command lines in the build output, you can see how 
authentication is done. If that information is visible, then the enterprise 
likely considers anyone who can see that information to be trusted to 
access those pods for diagnostic information, so you should be able to do 
the same thing.

On Thursday, October 29, 2020 at 7:50:32 AM UTC-7 Kari Atari wrote:

> Not sure if this would help, since I'm using Docker, not K8, but I bet 
> there's a similar option - when I a start a container I use a -v flag to 
> specify to copy the logs to the server it's running on.  This allows me to 
> have a persistent log that won't just go away if I remove and restart the 
> container.
>
> example:
> -v /path/to/server/log/directory:/path/from/container/logs/directory
>
>
> On Wed, Oct 28, 2020 at 11:43 PM touseef  wrote:
>
>> Can anyone provide pointer on  how do i get the logs of the containers 
>> running in kubernetes without using Kubectl because i dont have an access 
>> to the kubernetes cluster.
>> Is there any loging mechanism by which i can get the logs or stdout in 
>> the container to jenkins ? Help would be greatly appreciated.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/3b38d046-c55e-4e55-b9c3-7bc1d333a821n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/46f79f1d-4607-4556-9414-1d70ad02f3c4n%40googlegroups.com.


Re: How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-29 Thread Kari Cowan
Not sure if this would help, since I'm using Docker, not K8, but I bet
there's a similar option - when I a start a container I use a -v flag to
specify to copy the logs to the server it's running on.  This allows me to
have a persistent log that won't just go away if I remove and restart the
container.

example:
-v /path/to/server/log/directory:/path/from/container/logs/directory


On Wed, Oct 28, 2020 at 11:43 PM touseef  wrote:

> Can anyone provide pointer on  how do i get the logs of the containers
> running in kubernetes without using Kubectl because i dont have an access
> to the kubernetes cluster.
> Is there any loging mechanism by which i can get the logs or stdout in the
> container to jenkins ? Help would be greatly appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/3b38d046-c55e-4e55-b9c3-7bc1d333a821n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAE7w4hguR8be_JVOSwkY6hPmC1%2BBd%3D%3Do1MBznnGnqZ93UkuiRw%40mail.gmail.com.


How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-29 Thread touseef
Can anyone provide pointer on  how do i get the logs of the containers 
running in kubernetes without using Kubectl because i dont have an access 
to the kubernetes cluster.
Is there any loging mechanism by which i can get the logs or stdout in the 
container to jenkins ? Help would be greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3b38d046-c55e-4e55-b9c3-7bc1d333a821n%40googlegroups.com.