Intel Kubernetes Service¶
The Intel® Kubernetes Service provides developers with Kubernetes clusters for application development, AI/ML training, and more.
Note
Currently Intel Kubernetes Service is only available to premium and enterprise account users.
Create a Kubernetes Cluster¶
Navigate to the Intel Developer Cloud Console.
In the menu at left, click the Kubernetes icon.
Click Create Cluster.
Complete the required fields under Cluster details and configuration.
In Cluster name, enter a name.
In Select cluster K8S version, select a version.
Click Launch. After launching, the State column shows Updating.
Under Cluster Name column, click on your cluster.
Note
Now your Cluster name with Actions menu appears below.
Add Node Group to Cluster¶
From the Actions pulldown menu, select Add node group.
Enter your data in the Node group configuration menu.
In Node type, choose between Virtual Machine Bare Metal for your node. Note the cost per hour. See also Compare Instance Types below.
In Node group name, enter a name.
In Node quantity, choose a quantity from 1 to 10. Select the number of worker nodes you need in your cluster.
Tip
You can scale the number of worker nodes up or down.
Under Public Keys, select Upload Key or Refresh Keys.
Select Upload Key, name your key and copy your local SSH public key in the fields shown.
Select Upload Key.
Now, in Node group configuration, check the box next to the SSH key you added.
Compare Instance Types¶
At any time during Node group configuration, you may choose Compare instance types. This pop-out screen helps you compare and select your preferred processor.
Launch Kubernetes Cluster¶
When you create a cluster, it includes:
K8S Control-plane
ETCD Database
Scheduler
API Server
Select Launch.
Now that your Node group is added, it shows Updating in submenu.
When adding your Node Group is successful, each Node name appears and its State shows Active.
Connect to cluster¶
Set the
KUBECONFIG
Environment Variable:export KUBECONFIG=/path/to/your/kubeconfig
$Env:KUBECONFIG = "C:\path\to\your\kubeconfig"
Verify Configuration: Ensure that the current context points to the correct cluster.
kubectl config view
Basic CRUD operations¶
Create a pod.
kubectl apply -f pod-definition.yaml
Create a
YAML`
orJSON
file with your pod specificationsr. See example below.apiVersion: v1 kind: Pod metadata: name: mypod spec: containers: - name: mycontainer image: nginx
Read information. Replace “mypod” with the name of your pod.
kubectl get pods kubectl describe pod mypod
Update a Pod:
kubectl edit pod mypod
Note
This opens the pod configuration in your default editor. Make changes and save the file.
Delete a Pod. Replace mypod with the name of your pod.
kubectl delete pod mypod
Additional resources¶
Delete Cluster Group or Node¶
Delete Node Group¶
In the Cluster name submenu select the Node group you wish to delete.
Click Delete button.
Delete Node¶
Below the Node name table, note Add node and Delete node
Click Delete node button, as desired.
Select Continue.
Upgrade Kubernetes Cluster¶
In the Cluster name, Details, find the Upgrade link.
Select Upgrade.
In the Upgrade K8S Version, pull-down menu, select your desired version.
Click the Upgrade button.
During the upgrade, the Details menu State may show Upgrading controlplane.
Note
If the current version is penultimate to the latest version, only the latest version appears. When the version upgrade is successful, Cluster reconciled appears.
Apply Load Balancer¶
Navigate to the Cluster name submenu.
In the Actions menu, select Add load balancer.
In the Add load balancer, complete these fields.
Select the port number of your service from the dropdown menu.
For Type, select public or private.
Click on Launch.
In the Cluster name submenu, view the Load Balancer menu.
Your Load Balancer appears with Name and State shows Active .
K8S will automatically perform load balancing for your service.
Kubeconfig Admin Access¶
Ideally, you would export the :file: to your secret management system and continue.
In the Kubernetes Console, locate options below Kube Config.
Copy or Download the
kubeconfig
file and export it to your development environment.
Caution
Exercise caution while downloading, accessing, or sharing this file.