# ReplicaSet Definition (ONLY for LEARNING PURPOSE)
# NOT TO BE USED IN PRODUCTION ENVIRONMENT
# Use Deployment (Kind) instead of ReplicaSet
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: tc9-nr-replicaset
  namespace: omega
  labels:
    app: tc9-nr-replicaset
spec:
  replicas: 2
  selector:
    matchLabels:
      # Matching the labels from Pod Meta Data
      # Multiple labels can be used
      app: tc9-n-pod
  template:
    metadata:
      labels:
        app: tc9-n-pod
        release: stable
    spec:
      containers:
      - name: tc9-n-container
        image: metamagic/tomcat:9
        # Use Always ONLY for Development purpose.
        imagePullPolicy: IfNotPresent
        ports:
        # Port Exposed by the Container
        - containerPort: 8080
        resources:
        # QoS : Burstable
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 250m
            memory: 128Mi

