Add Kubernetes Cluster
You can add Kubernetes Cluster entities using the Add Entity UI or using the cloud agent command line interface (omcli
) with the appropriate JSON files.
Step 1: Prepare Kubernetes Cluster for monitoring.
For details on Kubernetes Cluster setup, see Kubernetes Cluster.
Step 2: Decide how you want to add the Kubernetes Cluster.
You can add Kubernetes Cluster entities using one of two ways:
- Add them from UI
- Use the agent's
omcli add_entity
command with the appropriate JSON files
Adding Entities from the UI
- From the Management Cloud main menu, select Administration, Discovery, and then Add Entity. The Add Entity page displays.
- Select the Kubernetes Cluster Entity Type.
- Enter the following UI properties.
Kubernetes Cluster UI Fields - Discover Using Credentials: Discover Kubernetes Cluster using Kubernetes Cluster credentials (on by default).
- Entity Name: Name of this entity displayed in the Oracle Management Cloud console.
- Kubernetes Master URL: Base URL of the API Server on the Kubernetes Master Node. The URL is of the form http(s)://<hostname>:<port>
- Host Name: Hostname of the Kubernetes master node
- Heapster URL: Base URL of Heapster. This needs to be specified if the performance metrics are to be collected from Heapster. If heapster is running inside Kubernetes as a cluster service the Base URL is of the form http(s)://<host>:<port>/api/v1/namespaces/kube-system/services/heapster/proxy Here, the host & port are same as in omc_kubernetes_master_url
- Cloud Agent: Cloud agent monitoring the host where the Kubernetes Cluster is installed.
Monitoring Credentials
Token Credentials
- Token: Token of the user going to discover Kubernetes
- Keystore Certificate: Certificate of Kubernetes API Server on Master Node. Users need to specify the text inside the certificate file if added from UI. In omcli, users need to create a Java Keystore, add certificate to that and specify the file path.
- Certificate Alias: Alias for the Certificate. This should be unique alphanumeric string
- Trust Store Password: Password of agent's Trust Store. This password is "welcome"
Basic Credentials
- Username: Username of the user going to discover Kubernetes
- Password: Password used for authentication.
- Keystore Certificate: Certificate of Kubernetes API Server on Master Node. Users need to specify the text inside the certificate file if added from UI. In
omcli
, users need to create a Java Keystore, add certificate to that and specify the file path. - Certificate Alias: Alias for the Certificate. This should be unique alphanumeric string
- Trust Store Password: Password of agent's Trust Store. This password is "welcome"
Keystore Credentials
- Store Location: Location of Client keystore. This Java Keystore file (JKS) should contain client's certificate.
- Store Type: Store type. This value is always set to "JKS"
- Store Password: The keystore password to access the JKS file.
- Keystore Certificate: Certificate of Kubernetes API Server on Master Node. Users need to specify the text inside the certificate file if added from UI. In omcli, users need to create a Java Keystore, add certificate to that and specify the file path.
- Certificate Alias: Alias for the Certificate. This should be unique alphanumeric string
- Trust Store Password: Password of agent's Trust Store. This password is "welcome"
See Add Entities from the Console for detailed instructions on using the Add Entity UI.
Using omcli
and the Appropriate JSON Files
- Download and extract the required JSON file(s) from the master JSON zip file. See the table below for the specific JSON files you'll need.
- Edit the file(s) and specify the requisite properties shown below.
Kubernetes Cluster JSON Files and Properties Replace any text inside brackets <> excluding these brackets with your values according the legend within the brackets <>.
See Kubernetes Cluster for property descriptions.
Definition Files
omc_kubernetes_cluster_insecure.json
omc_kubernetes_cluster_secure.json
Credential Files
omc_kubernetes_cluster_basic_creds.json
omc_kubernetes_cluster_keystore_creds.json
omc_kubernetes_cluster_token_creds.json
- Add the entity using
omcli
.omcli add_entity agent DEFINITION_FILE [-credential_file CREDENTIAL_FILE [-encryption_method_gpg]]
- Verify the status of the newly added entity.
omcli status_entity agent DEFINITION_FILE
See step 4. Adding Entities to Your Service of Add Entities Using JSON Files for more information.
Step 3: (Optional but recommended) Set up alerts.
To enable lights-out monitoring, you can set up alert rules to generate alerts and send notifications if your entities have performance issues.
See Set Up Alert Rules and Set Up Alert Thresholds and Notifications.Troubleshooting
If you run into any issues regarding discovery or monitoring of Kubernetes Cluster, see the following: