Settings
The plugin configuration file "pandora_kubernetes" is divided into sections (all configuration parameters will be indicated without quotation marks even if they have blank spaces):
API access settings
## API connection parameters
api_ip=192.168.80.145
api_port=8443
ssl=1
## HTTP bearer authentication parameters
auth_method=bearer
auth_token=auth-token
## HTTP basic authentication parameters
#auth_method=basic
#auth_user=user
#auth_pass=pass
api_ip
IP address to the Kubernetes API service.
port
Port listening to the Kubernetes API service.
auth_token
If "auth_method=bearer" indicates the authentication token of the user with access to the API. This token can be obtained by following these steps:
- Obtaining the user's "secret name":
$ kubectl get serviceaccounts user -o yaml
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: "2019-06-19T10:11:48Z"
name: user
namespace: namespace
resourceVersion: "327"
selfLink: /api/v1/namespaces/namespace/serviceaccounts/user
uid: a60f3652-927a-11e9-b423-ae1361a56794
secrets:
- name: secret_name
- Obtaining the “token” of the “secret name”:
$ kubectl describe secret secret_name
Name: secret-name
Namespace: namespace
Labels: <none>
Annotations: kubernetes.io/service-account.name: default
kubernetes.io/service-account.uid: a60f3652-927a-11e9-b423-ae1361a56794 Type: kubernetes.io/service-account-token
Data
====
token: auth-token
ca.crt: 1066 bytes
namespace: 7 bytes
auth_user
If "auth_method=basic" points out the user with access to the API.
ssl
Indicates whether the connection to the API is HTTPS or not (1 → HTTPS, 0 → HTTP).
auth_method
Authentication mechanism to be used. The values are either "bearer" or "basic".
auth_pass
If "auth_method=basic" indicates the user password with access to the API.