a. Retrieve the content of the existing secret nameddefault-token-xxxxxin the testing namespace.Store the value of the token in the token.txtb. Create a new secret named test-db-secret in the DB namespace with the following content:username:mysqlpassword:password@123Create the Pod name test-db-pod of image nginx in the namespace db that can access test-db-secret via a volume at path /etc/mysql-credentials
A) Explanation:
To add a Kubernetes cluster to your project, group, or instance:
Navigate to your:
Project'sOperations > Kubernetespage, for a project-level cluster.
Group'sKubernetespage, for a group-level cluster.
Admin Area >Kubernetespage, for an instance-level cluster.
ClickAdd Kubernetes cluster.
Click theAdd existing clustertab and fill in the details:
Kubernetes cluster name(required) - The name you wish to give the cluster.
Environment scope(required) - Theassociated environmentto this cluster.
API URL(required) - It's the URL that GitLab uses to access the Kubernetes API. Kubernetes exposes several APIs, we want the ''base'' URL that is common to all of them. For example,https://kubernetes.example.comrather thanhttps://kubernetes.example.com/api/v1.
Get the API URL by running this command:
kubectl cluster-info | grep -E 'Kubernetes master|Kubernetes control plane' | awk '/http/ {print $NF}'
CA certificate(required) - A valid Kubernetes certificate is needed to authenticate to the cluster. We use the certificate created by default.
List the secrets withkubectl get secrets, and one should be named similar todefault-token-xxxxx. Copy that token name for use below.
Get the certificate by running this command:
kubectl get secret <secret name> -o jsonpath='{['data']['ca\.crt']}'
Minna
11 months agoBarney
11 months agoBoris
11 months agoMabel
11 months agoChu
11 months agoNickole
11 months agoKimberely
11 months agoGregg
11 months agoTheola
12 months agoIluminada
12 months agoCarmela
12 months agoDominque
12 months ago