apiVersion: v1
kind: ReplicationController
metadata:
  name: helloworld
  labels:
    app: helloworld
spec:
  replicas: 1
  selector:
    app: helloworld
  template:
    metadata:
      labels:
        app: helloworld
    spec:
      containers:
        - name: helloworld
          image: luebken/httplog:latest
          ports:
            - name: http-server
              containerPort: 8000
          lifecycle:
            postStart:
              httpGet:
                path: "poststart"
                port: 8000 
#            preStop:
#              httpGet:
#                path: "prestop"
#                port: 8000 
#              exec:
#                command:
#                  - "/bin/echo"
#                  - "hi"