Git Product home page Git Product logo

k8s-crd's Introduction

k8s-crd

Custom Resource Definition (CRD)

Define the structure of the custom resource, including the allowed fields, data types, and validations

1- Run the command to create the CRD.

kubectl apply -f ./k8s/CustomResourceDefinition.yaml

2- Check if the CRD has been created.

kubectl get crd bucket.levi.com

Run localstack

3- Run command

docker-compose up -d

Access the LocalStack URL to view the list of buckets.

Run the application

4- Start application

PATH_KUBE_CONFIG="$HOME/.kube/config" \
AWS_PROFILE_NAME="local" \
AWS_CONFIG_ENDPOINT="http://localhost:4566" \
AWS_CONFIG_ACCESS_KEY_ID="localstack-key-id" \
AWS_CONFIG_SECRET_ACCESS_KEY="localstack-access-key" \
go run .

Custom Resource Instances

They are individual objects created based on the definition of a Custom Resource Definition

5- Run the command to create an instance of the CRD.

kubectl apply -f ./k8s/CustomResourceInstance.yaml

6- Check if the Instance has been created.

kubectl get bucket

Access LocalStack URL and refresh the page to view the created bucket.

Remove resources

7- Remove CRD Instance

kubectl delete -f ./k8s/CustomResourceInstance.yaml 

Check if the bucket has been removed in LocalStack URL.

8- Remove CRD

kubectl delete -f ./k8s/CustomResourceDefinition.yaml

k8s-crd's People

Contributors

levidi avatar levitomazzo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.