<commit_before># Kubernetes Artifacts for WSO2 API Manager #
The Kuberneters Artifacts provides the resources and instructions to deploy the built docker images of WSO2 products in Kubernetes.

## Try it out
Quick steps to run WSO2 API Manager default profile docker image on Kubernetes

* Prerequisites
    - Ensure default profile of API Manager docker is built and loaded in the Kubernetes node.
    Instructions on how to build API Manager docker image and load into the Kubernetes node is explained in [Dockerfile for WSO2 API MANAGER](https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/docker/README.md#building-the-docker-images).

* Deploying default profile
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`). 
    - Ensure the node ip is set correctly to `host` in the `deploy.sh`
    - Execute `deploy.sh` script and provide the deployment details.
        + `./deploy.sh 'default'`

* Access management console
    - Add an etc/hosts entry in your local machine for `<kubernetes_node_ip> am.wso2.com`. For example:
        + `172.17.8.102       am.wso2.com`
    - To access the management console.
        +  `https://<kubernetes_node_ip>:32004/carbon`. For example, `https://172.17.8.102:32004/carbon`.

## Deploy script

* How to deploy the default deployment
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`).
    - Ensure the node ip is set correctly to `host` in the `deploy.sh`
    - Execute `deploy.sh` script and provide the deployment details.
        + `./deploy.sh 'default'`
          
* How to deploy the distributed deployment
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`).
    - Execute `deploy.sh` script and provide the deployment details.
        + `./deploy.sh 'distributed'`
    - Distributed deployment will create the following services 
        + wso2am key manager
        + wso2am store
        + wso2am publisher
        + wso2am gateway manager
    
## Undeploy script

* How to undeploy the default or distributed deployment
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`).
    - Execute `undeploy.sh` .
          + `./undeploy.sh`           
* The `undeploy.sh` script has the following profiles defined to be undeployed. If it is required to undeploy any other profile, then it can be added to the `product_profiles` with a space as the separator.
    - `product_profiles=(default api-key-manager api-store api-publisher gateway-manager)`<commit_msg>updating README to reflect comandline options.<commit_after># Kubernetes Artifacts for WSO2 API Manager #
The Kuberneters Artifacts provides the resources and instructions to deploy the built docker images of WSO2 products in Kubernetes.

## Try it out
Quick steps to run WSO2 API Manager default profile docker image on Kubernetes

* Prerequisites

    - Ensure default profile of API Manager docker is built and loaded in the Kubernetes node.
    Instructions on how to build API Manager docker image and load into the Kubernetes node is explained in [Dockerfile for WSO2 API MANAGER](https://github.com/wso2/kubernetes-artifacts/blob/master/wso2am/docker/README.md#building-the-docker-images).

* Deploying default profile

    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`). 
    - Ensure the node ip is set correctly to `host` in the `deploy.sh`. 
      Else you can pass the correct host IP as an argument with -h option.
    - Execute `deploy.sh` script and provide the deployment details.
        + `./deploy.sh -d 'default'`

* Access management console

    - Add an etc/hosts entry in your local machine for `<kubernetes_node_ip> am.wso2.com`. For example:
        + `172.17.8.102       am.wso2.com`
    - To access the management console.
        +  `https://am.wso2.com:32004/carbon`. For example, `https://172.17.8.102:32004/carbon`.

          
* How to deploy in a ditributed manner
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`).
    - Execute `deploy.sh` script and provide the deployment details.
        + `./deploy.sh -d 'distributed'`
    - Distributed deployment will create the following services 
        + wso2am key manager
        + wso2am store
        + wso2am publisher
        + wso2am gateway manager
    
## Undeploy script

* How to undeploy the default or distributed deployment
    - Navigate to the `kubernetes` folder inside the module wso2am. (eg: `<REPOSITORY_HOME>/wso2am/docker`).
    - Execute `undeploy.sh` .
        
* The `undeploy.sh` script has the following profiles defined to be undeployed. If it is required to undeploy any other profile, then it can be added to the `product_profiles` with a space as the separator.
    - `product_profiles=(default api-key-manager api-store api-publisher gateway-manager)`
{'fraction_non_alphanumeric': 0.08366533864541832, 'fraction_numerical': 0.018924302788844622, 'mean_word_length': 3.265930331350892, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5169908', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1434, 'n_words': 563}