Kubernetes Classroom Series – 14/Oct/2019

Controllers

  • Controllers are part of Workload APIs
  • Controllers can maintain desired state

Replication Controller.

  • Replication controller can replicate pods.
  • Desired State would be number of pods
  • Gives Self-Healing Capability to K8S cluster

Writing Replication Controller Manifest YAML

  • In Replication Controller’s spec we would have information of POD.
  • Refer API Reference from here
---
apiVersion: v1
kind: ReplicationController
metadata:
  name: tomcat-rc
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: tomcat
    spec:
      containers:
        - image: tomcat:8
          name: tomcat
          ports:
            - containerPort: 8080
              protocol: TCP

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner