About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
How To
Summary
How to use a Kubernetes provider in order to create a namespaces in a remote OCP cluster?
Objective
Create a remote namespace
Environment
OCP 4.x , CAM 1.x
Steps
Generally the steps in the terraform documentation can be followed for this specific task:
Some customer have hit an issue when they deploy the template, namely:
Error applying plan:1 error(s) occurred: * kubernetes_namespace.example: 1 error(s) occurred: * kubernetes_namespace.example: Posthostname:8443/api/v1/namespaces: x509: certificate signed by unknown authority
The cause is the statical credentials in the TF files.
The following should be used: client_certificate = file("~/.kube/client-cert.pem") client_key = file("~/.kube/client-key.pem") cluster_ca_certificate = file("~/.kube/cluster-ca-cert.pem")
client_certificate, client_key and cluster_ca_certificate .
Where the variables are used to point to the pem files containing the needed details.
There are two options in regards to where to put these variables:
- 1. if you want to go on your path and provide the credentials in the terraform template, then you can copy the client certificate and the required files to the provider terraform PV. You can access them in terraform template in /home/terraform/<your folder>
- 2. You can define a new provider in CAM so you can create cloud connections later on. These steps can be done using CAM APIs.
Further info on point 1:
You would need to follow these steps to copy the client_certificate, client_key and cluster_ca_certificate to the provider terraform persisted volume.
Document Location
Worldwide
[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS2L37","label":"IBM Cloud Automation Manager"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]
Product Synonym
CAM, MCM, OCP, KUBE
Was this topic helpful?
Document Information
More support for:
IBM Cloud Automation Manager
Software version:
All Version(s)
Document number:
6360751
Modified date:
05 November 2020
UID
ibm16360751
Manage My Notification Subscriptions