-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md with instructions for installing and using the Appli…
…cation Operator
- Loading branch information
1 parent
d9f1e20
commit dcf6eb3
Showing
1 changed file
with
75 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,75 @@ | ||
# application-operator | ||
# 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: | ||
|
||
```bash | ||
git clone https://github.com/yourusername/application-operator.git | ||
cd application-operator | ||
``` | ||
|
||
2. Install the CRD: | ||
|
||
```bash | ||
kubectl apply -f config/crd/bases/ | ||
``` | ||
|
||
3. Install the Operator: | ||
|
||
```bash | ||
kubectl apply -f config/manager/ | ||
``` | ||
|
||
## Usage | ||
|
||
1. Create an Application resource: | ||
|
||
```yaml | ||
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 | ||
``` | ||
2. Apply the resource: | ||
```bash | ||
kubectl apply -f config/samples/ | ||
``` | ||
|
||
3. Verify that the Application resource has been created: | ||
|
||
```bash | ||
kubectl get app | ||
``` | ||
|
||
4. Verify that the Deployment and Service resources have been created: | ||
|
||
```bash | ||
kubectl get deployment | ||
kubectl get service | ||
``` |