Creating a PKS Kubernetes Cluster
Prerequisites
Note:
- Refer to the PKS documentation to configure pks and kubectl clients.
- For other useful links, refer to:
Note: If you have modified the
k8s_deploy_namespace to a specific namespace in k8s cluster, you need to configure kubectl again for the given namespace. After running the above command, the kube config file (~/.kube/config) will have an entry for the PKS k8s cluster and user as below.
Note down the value of cluster and user.
apiVersion: v1 clusters: - cluster: certificate-authority-data: abc server: <k8s master url> name: ml52pks1 contexts: - context: cluster: ml52-system user: 3d128617-ba6c-4764-886a-27db12dde826 name: ml52-system current-context: ml52-system kind: Config preferences: {} users: - name: ml52pks1 user: client-certificate-data: xyz
Creating a new context for namespace in kubectl
Execute below commands to create a new context for the namespace you want to deploy and configure kubectl for the new context.
Procedure
Copyright © Cloud Software Group, Inc. All rights reserved.