Created
January 3, 2019 16:43
-
-
Save wstrange/9b84199654e0de8616140b614d4dd7cc to your computer and use it in GitHub Desktop.
Kubernetes process namespacing sharing for JDK appps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test pod to demonstrate process namespace sharing between tomcat (using the JRE) and | |
# OpenJDK tools (jmap, jstack, etc.) | |
# See https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ | |
# Deploy using: kubectl create -f process-test.yaml | |
# Exec into the jdk container: kubectl exec tomcat -c jdk -it bash | |
# Use some debug commands: jps, jmap, jstack, etc. | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: tomcat | |
spec: | |
shareProcessNamespace: true | |
containers: | |
- name: tomcat | |
image: tomcat:9-jre11-slim | |
- name: jdk | |
image: openjdk:11-jdk-stretch | |
securityContext: | |
capabilities: | |
add: | |
- SYS_PTRACE | |
stdin: true | |
tty: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment