application-operator

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 11 Imported by: 0

README

Application Operator

The Application Operator is a Kubernetes operator built using the Go plugin of Operator SDK. It automates the process of deploying an application as a Kubernetes Deployment and exposing it as a Kubernetes Service.

Prerequisites

  • Kubernetes cluster
  • kubectl installed and configured to interact with your cluster
  • Operator SDK

Operator Installation

  1. Clone the repository:
git clone https://github.com/yourusername/application-operator.git
cd application-operator
  1. Install the CRD:
kubectl apply -f config/crd/bases/
  1. Install the Operator:
kubectl apply -f config/manager/

Usage

  1. Create an Application resource:
apiVersion: api.app.op/v1alpha1
kind: Application
metadata:
  labels:
    app.kubernetes.io/name: application
    app.kubernetes.io/instance: application-sample
    app.kubernetes.io/part-of: application-operator
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/created-by: application-operator
  name: application-sample
spec:
  replicas: 2
  image: sayedimran/fastapi-sample-app:v4
  port: 7000
  env:
  - name: APP_ENV
    value: production
  - name: APP_NAME
    value: fastapi-sample-app
  1. Apply the resource:
kubectl apply -f config/samples/
  1. Verify that the Application resource has been created:
kubectl get app
  1. Verify that the Deployment and Service resources have been created:
kubectl get deployment
kubectl get service

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the api v1alpha1 API group +kubebuilder:object:generate=true +groupName=api.app.op
Package v1alpha1 contains API Schema definitions for the api v1alpha1 API group +kubebuilder:object:generate=true +groupName=api.app.op

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳